Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
vegv6
 
Posts: n/a
Default pasting creates 65000 lines

My macro filters for data, then select all all cells(ctrl+a) and then pastes
in a new sheet which works fine but it makes the file size hugh and creates
65000 rows, how do i copy and paste without doing this without having to know
before hand how many rows and columns to select. This also applies when it's
not a macro and i just filter, copy and paste into a new sheet.
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

Ctrl-a selects the entire sheet (Except in Excel 2003). It would be better
to select just the region with data. How you do that depends on how the
data is arranged.

This select all data:

ActiveSheet.UsedRange.Select

This selects the contiguous region of data around the active cell (same as
pressing Ctrl-*):

ActiveCell.CurrentRegion.Select

--
Jim Rech
Excel MVP
"vegv6" wrote in message
...
| My macro filters for data, then select all all cells(ctrl+a) and then
pastes
| in a new sheet which works fine but it makes the file size hugh and
creates
| 65000 rows, how do i copy and paste without doing this without having to
know
| before hand how many rows and columns to select. This also applies when
it's
| not a macro and i just filter, copy and paste into a new sheet.


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
Save as Web Page with grid lines ralph Excel Discussion (Misc queries) 0 February 24th 05 12:34 AM
How do I delete filtered lines in Excel 2000? Nicola H Excel Worksheet Functions 1 February 8th 05 03:47 PM
Add more lines and more columns in Excel Marc Charbonneau Excel Worksheet Functions 3 January 20th 05 03:44 AM
How to force continuous lines in line charts wal50 Charts and Charting in Excel 1 December 21st 04 10:43 PM
Bold Grid Lines Ctunes Excel Discussion (Misc queries) 1 December 8th 04 09:00 PM


All times are GMT +1. The time now is 11:52 PM.

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"