Hi all,
I've been really stuck with the below so I'm hoping someone can save the day for me. I'm trying to divide the last value in each column by a figure stored as an integer but I keep getting a run time 1004 error, method 'range of object'_Global' failed and I can't seem to figure it out.
The setting of the 'rng' is fine and works and this is part of a 'With' statement that has defined what worksheet I'm working on but when I attempt to write a formula in the range I get the error. I have similar formulas to the above that are working so I'm not sure why this doesn't. What I'm hoping to see is a formula that looks like '=(B42/40)*(1-(B42/40))'. If anyone can provide assistance I would be really grateful.
Thanks
I've been really stuck with the below so I'm hoping someone can save the day for me. I'm trying to divide the last value in each column by a figure stored as an integer but I keep getting a run time 1004 error, method 'range of object'_Global' failed and I can't seem to figure it out.
Code:
With rng
.Formula = "=(" & Range(Cells(LRow, 2)).Address(False, False) & "/" & TotQ & "*(1-(" & Range(Cells(LRow, 2)).Address(False, False) & "/" & TotQ & "))"
End With
The setting of the 'rng' is fine and works and this is part of a 'With' statement that has defined what worksheet I'm working on but when I attempt to write a formula in the range I get the error. I have similar formulas to the above that are working so I'm not sure why this doesn't. What I'm hoping to see is a formula that looks like '=(B42/40)*(1-(B42/40))'. If anyone can provide assistance I would be really grateful.
Thanks