View Full Version : Excel Macros - Selection.AutoFill Destination

02-04-2005, 07:59 PM
I have created a macro with a few autofills.

Looks like this:

ActiveCell.FormulaR1C1 = "=SUM(RC[-1]*0.2)"
Selection.AutoFill Destination:=Range("C2:C18420")

I will use this macro on a daily basis & the problem is the # of rows changes from day to day. What do I need to change to 'get' the last row & use that row number in the above example?

So if the last row was 19000, my range would be C2:19000.

Thanks in advance for your help!