I have a line of code as follows;
Which should return a formula like this;
=IF(MONTH($C$2)&YEAR($C$2)=MONTH($F7)&YEAR($F7),"Y","")
But when I run the code, it does nothing.
I think its something to do with the R1C1 bits, but I don't know how to correct it!
What am I doing wrong?
TIA
Code:
ActiveCell.Offset(0, 58).FormulaR1C1 = "=If(MONTH($C$2)&YEAR($C$2)=MONTH(RC[-49])&YEAR(RC[-49]),""Y"","")"
Which should return a formula like this;
=IF(MONTH($C$2)&YEAR($C$2)=MONTH($F7)&YEAR($F7),"Y","")
But when I run the code, it does nothing.
I think its something to do with the R1C1 bits, but I don't know how to correct it!
What am I doing wrong?
TIA