Using Variables in R1C1 formulas

A

Alex R

I am trying to create a formula in a cell to set the value of the cell equal
to another cell that is a varible number of cells away.

for example
Dim x As Integer
x = 4
Range("B1").FormulaR1C1 = "=R[x+1]C"
 
N

Niek Otten

Hi Alex,

Range("B1").FormulaR1C1 = "=R[" & x+1 & "]C"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


|I am trying to create a formula in a cell to set the value of the cell equal
| to another cell that is a varible number of cells away.
|
| for example
| Dim x As Integer
| x = 4
| Range("B1").FormulaR1C1 = "=R[x+1]C"
|
 

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