Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default select dynamic range with dynamic start point

I need to select a dynamic range (known number of columns, unknown number of
rows), where the starting row always changes, and paste it to another workbook

I'm always able to determine the starting cell of the range by searching
(FIND) for the heading in the report and offsetting by 1 row. I know that
the data should be in columns A through F, with a dynamic number of rows.
So, at first I just used some simple code to select the range:
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

This worked fine until a report came back with no data under the report
heading. The above code caused me to have too many columns to paste in the
other workbook. The number of rows were okay because of the heading for the
next section of the report stopped the .End(xlDown)

Any ideas on how to select the range or if the section is blank how do I
skip this part of the macro?

THANKS!
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
Dynamic pivot table linked to dynamic excel spreadsheets FErd Excel Worksheet Functions 0 April 29th 10 10:44 PM
Dynamic Charts where start is known, but end is unknown Rcarper Charts and Charting in Excel 5 January 16th 09 06:48 PM
can I pick start point in a range? nastech Excel Discussion (Misc queries) 1 March 15th 06 09:32 AM
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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM


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