Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill last row?
Try this
Sub filldownrow() Dim rng1 As Range For a = 1 To 9 Set rng1 = Sheets("Sheet1").Cells(1, a).End(xlDown) rng1.AutoFill _ Destination:=Range(rng1, _ rng1.Offset(1, 0)), _ Type:=xlFillDefault Next End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "chris" wrote in message ... With the help of this newsgroup I was able to write the following macro to autofill the last cell in column A down one row: Sub filldownrow() Dim rng1 As Range Set rng1 = Sheets("Totals").Range("A1").End(xlDown) rng1.AutoFill _ Destination:=Range(rng1, _ rng1.Offset(1, 0)), _ Type:=xlFillDefault End Sub Now I need to do the same thing but for the entire last row (or columns A through I to be exact.) I know I could just run 9 different macros, but would prefer just one. Any help would be greatly appreciated. Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
AutoFill | Excel Discussion (Misc queries) | |||
AutoFill A to Z | New Users to Excel | |||
Autofill | Excel Worksheet Functions | |||
Autofill | Excel Worksheet Functions | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) |