Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a Macro to copy a formula into last active row
Hi I am recording a Macro which carries out various procedures on a file which is downloaded weekly and in which the number of rows various. One part of the macro is to run an If Statement in column G which once generated I want to copy down the remaining active cells in column G which varies each time the file is downloaded. Is there any way I can get the results of the If statement only to fill down active rows or do I need to copy it the whole length of the worksheet and then delete all the surplus rows. Thanks Shirley Munro -- Shirley Munro ------------------------------------------------------------------------ Shirley Munro's Profile: http://www.excelforum.com/member.php...nfo&userid=836 View this thread: http://www.excelforum.com/showthread...hreadid=509950 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a Macro to copy a formula into last active row
The exact mechanics of doing this depend on where your data is and how to
determine the row count. But if I assume that the data starts in G1 and you want to fill down to the last active row in the sheet, this is one way: Range("G1").Resize(ActiveSheet.UsedRange.Rows.Coun t).FillDown -- Jim "Shirley Munro" wrote in message news:Shirley.Munro.22wni0_1139392805.8743@excelfor um-nospam.com... | | Hi | | I am recording a Macro which carries out various procedures on a file | which is downloaded weekly and in which the number of rows various. | One part of the macro is to run an If Statement in column G which once | generated I want to copy down the remaining active cells in column G | which varies each time the file is downloaded. Is there any way I can | get the results of the If statement only to fill down active rows or do | I need to copy it the whole length of the worksheet and then delete all | the surplus rows. | | Thanks | | Shirley Munro | | | -- | Shirley Munro | ------------------------------------------------------------------------ | Shirley Munro's Profile: http://www.excelforum.com/member.php...nfo&userid=836 | View this thread: http://www.excelforum.com/showthread...hreadid=509950 | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to copy active worksheet to new workbook | Excel Discussion (Misc queries) | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
how to copy a trendline formula into an active cell ? | Excel Discussion (Misc queries) | |||
Macro Copy Active Cell to Range Name, loop | Excel Programming | |||
Copy formula in active cell | Excel Programming |