Quadvark
11-13-2016, 10:43 PM
Hi,
I have a program that was developed for me but the programmer is no longer available. In the following routine below (line 2) I'd like to be able to have the "S" value multiplied by 12 (S*12) but every way I try to get it to work, i.e. to add double quotations, parenthesis, etc around the S value, I always get an error when executing the macro.
Can someone please tell me how to get this to work?
Much thanks,
Quadvark
For r = md2.startRow To md2.endRow - 1
Range("A" & r) = "=(C" & r & " + E" & r & " + Q" & r & " + S" & r & ")/4"
Range("A" & r).NumberFormat = "0.0"
Next
I have a program that was developed for me but the programmer is no longer available. In the following routine below (line 2) I'd like to be able to have the "S" value multiplied by 12 (S*12) but every way I try to get it to work, i.e. to add double quotations, parenthesis, etc around the S value, I always get an error when executing the macro.
Can someone please tell me how to get this to work?
Much thanks,
Quadvark
For r = md2.startRow To md2.endRow - 1
Range("A" & r) = "=(C" & r & " + E" & r & " + Q" & r & " + S" & r & ")/4"
Range("A" & r).NumberFormat = "0.0"
Next