I need to write code which will place the following If statement as a formula into cell Q while the cursor is at cell A,
=if(p1=””,O1,P1)
My current code reads:
strformula = “=If(” & CStr(ActiveCell.Offset(0.15).Address) & “=””,” & CStr(ActiveCell.Offset(0, 14).Address) & “,” & CStr(ActiveCell.Offset(0.15).Address) & “)”
ActiveCell.Offset(0, 16).Value = strformula
Unfortunately this does not work. Can anybody asist.