Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill question
How do I modify the following statement so that it does
not have a specific range hard-coded ? Selection.AutoFill Destination:=ActiveCell.Range ("A1:B2498") I need it to be generic in nature so that it will copy the formula from the active cells to all rows below where there is a value in the cell to the left. Thanks !! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill question
Eric
try this: ActiveCell.AutoFill _ Destination:=Range(ActiveCell, _ ActiveCell.Offset(0, -1).End(xlDown).Offset(0, 1)) Regards Trevor "Eric Dreshfield" wrote in message ... How do I modify the following statement so that it does not have a specific range hard-coded ? Selection.AutoFill Destination:=ActiveCell.Range ("A1:B2498") I need it to be generic in nature so that it will copy the formula from the active cells to all rows below where there is a value in the cell to the left. Thanks !! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill question
Trevor has supplied the code requested, but you don't really need a macro if this is all you are doing. The same operation can be
performed by selecting the cell to be copied and double clicking the Auto-Fill handle at the bottom right corner of the cell, -- John Green - Excel MVP Sydney Australia "Eric Dreshfield" wrote in message ... How do I modify the following statement so that it does not have a specific range hard-coded ? Selection.AutoFill Destination:=ActiveCell.Range ("A1:B2498") I need it to be generic in nature so that it will copy the formula from the active cells to all rows below where there is a value in the cell to the left. Thanks !! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill question
Thank you both for your reply....I knew about the double
click, but I am needing the macro to automate a process so I will give the code that Trevor supplied a try. Thanks for your help ! -----Original Message----- Eric try this: ActiveCell.AutoFill _ Destination:=Range(ActiveCell, _ ActiveCell.Offset(0, -1).End (xlDown).Offset(0, 1)) Regards Trevor "Eric Dreshfield" wrote in message ... How do I modify the following statement so that it does not have a specific range hard-coded ? Selection.AutoFill Destination:=ActiveCell.Range ("A1:B2498") I need it to be generic in nature so that it will copy the formula from the active cells to all rows below where there is a value in the cell to the left. Thanks !! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofill question I think... | Excel Discussion (Misc queries) | |||
Autofill question | Excel Discussion (Misc queries) | |||
Autofill Question | Excel Worksheet Functions | |||
autofill question | Excel Discussion (Misc queries) | |||
Autofill question | Excel Worksheet Functions |