Excel file size ballooning after copying data from one sheet to another

shadowwizard

New member
Joined
Mar 6, 2024
Messages
2
Reaction score
0
Points
1
Excel Version(s)
2013
I have an excel sheet that is essentially just data (no formulas) and it is about 1.5 MB is size. The top of each column is a filter for what is is that column. Use the filter to filter the data, click the top row, use ctrl-shift down to get to the bottom row, do a ctrl-c to copy, and create a new tab. I do a ctrl-v to paste, save the file, and now its 74 MB. If I copy and past some rows into a new sheet this does not occur. It seems as though the copying/pasting of rows after a filter causes the size of the file to balloon out of control.
This should be impossible. Any ideas where I can begin the search to find what is causing this?
 
Hi and welcome
perhaps you can find some info at https://trumpexcel.com/reduce-excel-file-size/
Thanks for the suggestion, but some things aren't in my version of excel, and it still doesn't seem to solve the issue of 1.5 MB + 1.5 MB = 74 MB.
It did however give me some things to go through to see if they could be the problem. There are no formulas, and there are no photos. It wasn't a binary file when I loaded it, so copying data to another place shouldn't need me to save it to a different type of file (As I said, I copies 1.5 MB from one sheet to another.) I do not have an analyze tab, but again, since this is just pure data in each sell, I would guess it likely doesn't use anything complex such as pivot tables.. Not that I know what they are. It wasn't zipped before, so 1.5 MB + 1.5 MB should not result in a file that needs to be zipped to get it back to 3 MB...
So thank you for the ideas, but unfortunately I don't think any of them will help.
 
Don't know if this will make any difference but have a try running this macro from here and see if it saves with a different file size.
VBA:
Sub LoseThatWeight()

    Dim x As Long, LastRow As Long, LastCol As Long

    Application.ScreenUpdating = False

    On Error Resume Next

    For x = 1 To Sheets.Count
        With Sheets(x)
            LastRow = .Cells.Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, _
                                  LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
            LastCol = .Cells.Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, _
                                  LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
            .Range(.Cells(1, LastCol + 1), .Cells(Rows.Count, Columns.Count)).Delete
            .Range(.Cells(LastRow + 1, 1), .Cells(Rows.Count, Columns.Count)).Delete
        End With
    Next x
    On Error GoTo 0
    Application.ScreenUpdating = True
End Sub
 
Back
Top