View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jeff Standen[_2_] Jeff Standen[_2_] is offline
external usenet poster
 
Posts: 56
Default copy formula down and ever change range

Without knowing what your data is like it's hard to say but something like

range("a65536").end(xlup)

Which will find the last cell in col A with data in it. You can use offset
to get exactly the right cell.

Jeff

"Dean" wrote in message
...
I have a spreadhseet that uses the "Data", "Subtotals" in VBA obviously to
subtotal items. I want a formula copied down the entire list, after the
subtotal.
I have this all working (probably not as easily as some would have it, but
it works), except at the moment the formula is copied down a static number
of
rows.

How do I copy it down to the last cell in my range, not knowing how big
the
range is to start with?

Thanks
Dean