I have the following line of code:
ActiveCell.FormulaR1C1 = "=sqrt(RC[-1])"
Now instead of -1, I want to use a variable, say x, as follows:
ActiveCell.FormulaR1C1 = "=sqrt(RC[x])"
This returns an error. Is there any way I can do this?
Like this:
ActiveCell.FormulaR1C1 = "=sqrt(RC[" & x & "])"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With