Johnatha
01-08-2016, 08:20 AM
Hi,
I'm looking to insert a formula onto a sheet using a macro. So far my code works and looks like this
Range("D:D").FormulaR1C1 = "=IFERROR(RC[-1]/RC[-2],"""")"
The problem is that it inserts the formula for the entire column D. I'd like to have the formula start from cell "D1" and finish wherever my last cell in column C is located (for example, "C75" so range "D1 : D75").
Is there any way I can do this? I sort of know how to use LastRow but not sure how to apply it here. Still a newbie :cool:
Thanks!
Johnathan
I'm looking to insert a formula onto a sheet using a macro. So far my code works and looks like this
Range("D:D").FormulaR1C1 = "=IFERROR(RC[-1]/RC[-2],"""")"
The problem is that it inserts the formula for the entire column D. I'd like to have the formula start from cell "D1" and finish wherever my last cell in column C is located (for example, "C75" so range "D1 : D75").
Is there any way I can do this? I sort of know how to use LastRow but not sure how to apply it here. Still a newbie :cool:
Thanks!
Johnathan