View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default VBA r1c1 absolute previous row in formula

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

"SLP" wrote:

Hi, I get an error message when I run this code:

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

I need to use the cell directly above the cell the where the pointer is. If
I don't make it an absolute reference it works fine but I need it to be an
absolute as the formula gets copied down. Also, this gets used threw out the
routine so I can't hard set the cell above.

Thanks.