View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Calculating column based on formula

You're mixing R1C1 reference style with A1 reference style.

If you decide to use all R1C1 reference style, then use .formulaR1C1 =

(and just a little help: $g$11 is r11c7)


S Himmelrich wrote:

I'm getting an "Application-defined or object-defined error" on the
line below that I've identified...can anyone help me out on this?

Dim last7 As Long
last7 = Worksheets("Working Sheet").Cells(Rows.Count,
"J").End(xlUp).Row
Range("K1").Formula = "=IF(SUM('Working Sheet'!RC[1]/MACRO!G
$11$)),"",SUM('Working Sheet'!RC[1]/MACRO!G$11$)" <---LINE WITH ERROR
Range("K1").AutoFill Destination:=Range("K1:K" & last7)


--

Dave Peterson