Hi
I am trying to input a formula into column V as below. I get a Compile error: Expected end of statement message pop up.
Dim lastRow As Long
Set fnd = Range("A:A").Find("Currency", , , xlWhole, , , False, , False)
If fnd Is Nothing Then Exit Sub
lastRow = Cells(Rows.Count, "D").End(xlUp).Row
Range("V2:V" & fnd.Row - 1).FormulaR1C1 = "=IF(AND(RC[-18]=""POUND STERLING"",Manual!R1C6=1),(RC[-8]+RC[-7])/"R"&lastRow+53)*"Q"&lastRow+53"
It doesn't like the " around the R and around the Q.
What I am trying to achieve is in column V input a formula referencing a cell that is located 53 cells below lastRow of column R and 53 cells below lastRow of column Q
How can I achieve this?
Thanks
I am trying to input a formula into column V as below. I get a Compile error: Expected end of statement message pop up.
Dim lastRow As Long
Set fnd = Range("A:A").Find("Currency", , , xlWhole, , , False, , False)
If fnd Is Nothing Then Exit Sub
lastRow = Cells(Rows.Count, "D").End(xlUp).Row
Range("V2:V" & fnd.Row - 1).FormulaR1C1 = "=IF(AND(RC[-18]=""POUND STERLING"",Manual!R1C6=1),(RC[-8]+RC[-7])/"R"&lastRow+53)*"Q"&lastRow+53"
It doesn't like the " around the R and around the Q.
What I am trying to achieve is in column V input a formula referencing a cell that is located 53 cells below lastRow of column R and 53 cells below lastRow of column Q
How can I achieve this?
Thanks