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: 1
Default copying dynamic range based on cell outside of range


i am copying a dynamic range of cells from twelve different worksheets.
i need to select a range that starts of g10 on every sheet, but ends
differently on every sheet. the range ends depending on column A in the
last row of each range, the word 'total'. i would like to select the
range in column g10 down to the cell corresponding with 'total' in
column a in column g. For example, if there is 'total' is in a56, i
want to select and copy g10-g56. If on another sheet 'total' is in a68,
i want to select and copy g10-g68. there is information below the range.
i want to ignore the data below altogther. here is the code that i have
now for the first sheet. it grabs G10 through the last cell in column
g. any help would be appreciated. thanks.


Code:
--------------------
Sheets("January 2005").Select
Range(Range("G10"), Cells(Rows.Count, Columns("G").Column).End(xlUp)) _
Copy Worksheets("SALES REPORT").Range("a2")
--------------------


--
xcelelder
------------------------------------------------------------------------
xcelelder's Profile: http://www.excelforum.com/member.php...o&userid=27637
View this thread: http://www.excelforum.com/showthread...hreadid=471553

 
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
Dynamic range based on another column Carrie_Loos via OfficeKB.com Setting up and Configuration of Excel 2 May 11th 10 06:49 PM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Selecting and copying a dynamic range of cells EstherJ Excel Programming 2 August 11th 05 06:07 PM
VBA: copying and inserting a dynamic range JP[_10_] Excel Programming 2 June 1st 04 10:29 PM
Copying block (range of cells) based on a value of a specific cell-VBA Branimir Excel Programming 1 October 15th 03 06:07 PM


All times are GMT +1. The time now is 07:00 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"