absolute reference r1c1 code

S

SLP

How do I turn this so the first cell is an absolute reference? When I delete
the [] around the -1, I get an error message. Thanks.

ActiveCell.FormulaR1C1 = "=round(R[-1]c[0]*RC[7],2)"
 
J

Jacob Skaria

Try the below

'Column and row locked
ActiveCell.FormulaR1C1 = "=round(R" & ActiveCell.Row - 1 & "C" & _
ActiveCell.Column & "*RC[7],2)"

'Row locked
ActiveCell.FormulaR1C1 = "=round(R" & ActiveCell.Row - 1 & "C*RC[7],2)"


If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top