R
ranswert
I have this code to enter a formula into a cell:
Dim lcell As String
Dim rng as range
lcell = Sheets("Estimates").Range("estdbcboxlnkcell").Offset(estnum,
0).Address
rng.FormulaR1C1 = "=if(" & lcell & ",RC[-2],0)"
I get an error message when it is run. What am I doing wrong?
Thanks
Dim lcell As String
Dim rng as range
lcell = Sheets("Estimates").Range("estdbcboxlnkcell").Offset(estnum,
0).Address
rng.FormulaR1C1 = "=if(" & lcell & ",RC[-2],0)"
I get an error message when it is run. What am I doing wrong?
Thanks