Thread: copy formula
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
snax500[_2_] snax500[_2_] is offline
external usenet poster
 
Posts: 29
Default copy formula

I want to copy a formuala down a column. There maybe blank spaces in
my column. My last row is 5000 but may grow maybe to 10000. I have not
seen it coded like this (using Offset and End xlUp) before but it
appears to work. Is this OK to code like this? Other people seem to
code using something like this -
Range(Range("A2"),Cells(rows.count,"A").End(xlup)) .

Thanks


For Each cll In Range("q6:da6")
If cll.HasFormula = True Then
cll.Copy
Range(cll, cll.Offset(30000, 0).End(xlUp)).PasteSpecial

End If
Next