View Single Post
  #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.