Results 1 to 13 of 13

AUTOFILTER causes the file size to increase

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-04-2005
    Location
    Madrid, Spain
    MS-Off Ver
    2010
    Posts
    241

    AUTOFILTER causes the file size to increase

    I see there are many posts in this Forum dealing with size-increasing macros, most of them blaming it on unused rows, cells or blanks. That’s not the case for me now.
    I think I’ve tracked the cause to the Data/Filter function of Excel (or perhaps to the Data/Subtotal function???). Here:

    My file is a list of rows with figures in one column, and also with subtotal rows from time to time (these have been obtained by some previous code in my macro calling for the Data/Subtotal function of Excel).
    Now, further down, some other code lines in the macro filter the list to show only the rows beginning with “Total” or, alternatively, showing all lines; here is the filtering code:
    Columns("C:C").AutoFilter    
    Selection.AutoFilter Field:=1, Criteria1:="Total"
    That works O.K., but the size of my file may increase by about one megabyte, depending on when I save it, thus:

    - If I save my list for the FIRST TIME after running the filtering macro lines (that is, with only the Subtotal rows shown), then the size of the file will be increased by a mega.
    And even if subsequently I unfilter my list and save it again as unfiltered (that is, with all rows visible), the size will remain so increased.

    - But if I save the list for the FIRST TIME before running the filtering macro lines (while still showing all the rows), then the size won’t be increased at all.
    And even if subsequently I filter the list and save it again as filtered (that is, with only the Subtotal rows visible), the size will still remain unincreased.

    - Finally, if I do the filtering MANUALLY (not by executing the macro), then the size of the file will never increase in size, whether I do the first saving with the list filtered or unfiltered.

    Is all this just a confusing mess or does it suggest a possible remedy to you, experts out there? Thank you in advance.
    ACA
    Last edited by aca; 07-10-2011 at 11:49 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1