Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy active worksheet to new workbook Macca Excel Discussion (Misc queries) 1 May 25th 08 02:07 PM
copy name from active sheet to cell - using macro or function dymek Excel Worksheet Functions 2 October 2nd 06 12:32 PM
how to copy a trendline formula into an active cell ? bushra Excel Discussion (Misc queries) 0 July 7th 06 04:57 PM
Macro Copy Active Cell to Range Name, loop zigstick Excel Programming 6 April 27th 05 07:55 PM
Copy formula in active cell alabanda Excel Programming 1 January 12th 04 01:45 PM


All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"