Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Huge Worksheet

Hello,
I have a table that I filter and then copy to a new page. The problem is
that the table is only about 20 rows long when I filter it. But, when I
copy it to a new worksheet, the workbook becomes almost 3.5 MB in size. It
is like the workbook thinks there is something all the way down to row
65,000. The code I use is:

If ActiveSheet.AutoFilterMode = False Then Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=Branchname
Call FindtheCol(ColName) finds a spefiic column
NColl = ActiveCell.Column
Union(Columns(2), Columns(NColl)).Copy

Any ideas on how to avoid this?

Thanks,

Bill


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Huge Worksheet

You can try this rather than copying the whole column.

If ActiveSheet.AutoFilterMode = False Then Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=Branchname
Call FindtheCol(ColName) finds a spefiic column
NColl = ActiveCell.Column
set rng = Union(Columns(2), Columns(NColl))
set rng1 = ActivesheetAutofilter.Range.Specialcells(xlVisible )
set rng2 = Intersect(rng2.EntireRow,rng1)
rng2.copy

--
Regards,
Tom Ogilvy



"Bill" wrote in message
nk.net...
Hello,
I have a table that I filter and then copy to a new page. The problem is
that the table is only about 20 rows long when I filter it. But, when I
copy it to a new worksheet, the workbook becomes almost 3.5 MB in size.

It
is like the workbook thinks there is something all the way down to row
65,000. The code I use is:

If ActiveSheet.AutoFilterMode = False Then Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=Branchname
Call FindtheCol(ColName) finds a spefiic column
NColl = ActiveCell.Column
Union(Columns(2), Columns(NColl)).Copy

Any ideas on how to avoid this?

Thanks,

Bill




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
Sorting huge worksheet Felix Excel Discussion (Misc queries) 2 May 21st 08 08:59 PM
Huge Repository!!! [email protected] Excel Discussion (Misc queries) 0 June 14th 07 09:22 AM
FROM A HUGE SHEET, A PORTION OF IT IS SELECTED TO PASTE IT IN A NEW WORKSHEET BUT UNABLE TO CAPTGNVR Excel Discussion (Misc queries) 1 February 6th 07 06:14 AM
huge huge excel file... why? Josh Excel Discussion (Misc queries) 12 February 9th 06 09:55 PM
Newbie: worksheet function advise (huge please) CF Excel Worksheet Functions 1 September 24th 05 05:44 PM


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