R1C1 Notation???

C

Clueless

I have the following code in my VB:

Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R-12C2)"

My next procedure in the macro drags the formula down the range of cells,
however I want R-12C2 to reference the same cell [EF25] as it is dragged down.

Is there a code to do such a task???
 
D

Dave Peterson

That doesn't look like a valid formula to me.

I bet you meant:
Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R[-12]C2)"


But I can refer to EF25 by using:
R25C136

So try:

Range("ED37").FormulaR1C1 = "=-(RC[-118]*R25C136)"


I have the following code in my VB:

Range("ED37").Select
ActiveCell.FormulaR1C1 = _
"=-(RC[-118]*R-12C2)"

My next procedure in the macro drags the formula down the range of cells,
however I want R-12C2 to reference the same cell [EF25] as it is dragged down.

Is there a code to do such a task???
 

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