LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Code to Resize a variable number of rows including target

I have the ?? hard coded in my macro but sometimes the number of rows to include vary.

I know I have hit all around it but can't nail the proper xldown.rows.count or Rows.Count).End(xlUp)scheme to replace the ??.

I thought for sure I would have it in my cheat-sheet but...

If Not aCell Is Nothing Then
aCell.Resize(??, 1).Copy Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp)(2)
End If

Thanks,
Howard
 
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
variable number of rows. krigger228 Excel Programming 3 February 28th 09 03:50 PM
Create a production v's target report in excel including graphs louiscourtney Excel Discussion (Misc queries) 0 October 19th 06 03:39 PM
Get number of rows that data uses, including blank rows Denham Coote Excel Discussion (Misc queries) 5 August 22nd 06 02:10 PM
Get number of rows that data takes up, including blank rows Denham Coote Excel Worksheet Functions 2 August 21st 06 09:18 AM
Including a variable number of columns in Excel Sum formula Richard Buttrey[_5_] Excel Programming 1 July 7th 04 10:29 AM


All times are GMT +1. The time now is 09:42 PM.

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

About Us

"It's about Microsoft Excel"