See the end of the page if you want the “blog” part. I will typically list methods here from most impactful to least impactful, considering both performance and the end result of your spreadsheet.

Performance (CPU and RAM)

Consolidate Pivot Tables

If two tables will reference the same data, copy the initial pivot table instead of creating a new one. This allows the tables to share a Pivot Cache.

This macro will de-duplcate exisiting pivot tables. Be sure to create a backup. Credit to

Sub CheckCaches()
' Developed by Contextures Inc.
Dim pc As PivotCache
Dim wsList As Worksheet
Dim lRow As Long
Dim lRowPC As Long
Dim pt As PivotTable
Dim ws As Worksheet
Dim lStart As Long
lStart = 2
lRow = lStart

Set wsList = Worksheets.Add
For Each pc In ActiveWorkbook.PivotCaches
  wsList.Cells(lRow, 1).Value = pc.Index
  wsList.Cells(lRow, 2).Value = pc.SourceData
  wsList.Cells(lRow, 3).FormulaR1C1 = _
  lRow = lRow + 1
Next pc

For lRowPC = lRow - 1 To lStart Step -1
  With wsList.Cells(lRowPC, 3)
    If IsNumeric(.Value) Then
      For Each ws In ActiveWorkbook.Worksheets
      Debug.Print ws.Name
        For Each pt In ws.PivotTables
        Debug.Print .Offset(0, -2).Value
          If pt.CacheIndex = .Offset(0, -2).Value Then
            pt.CacheIndex = .Value
          End If
        Next pt
      Next ws
    End If
  End With
Next lRowPC

'uncomment lines below to delete the temp worksheet
'Application.DisplayAlerts = False

Application.DisplayAlerts = True
Exit Sub

MsgBox "Could not change all pivot caches"
Resume exitHandler

End Sub

Seperate Instances

Benefit: Opening workbooks in separate instances can bypass memory limits and prevent everything from crashing if a single sheet does.

Drawback: You cannot use certain “Paste Special” features between workbooks (Formulas, Values, Formats, Comments).

The most reliable way is to run the command Excel.exe /x. Other methods typically involve holding “Alt” while opening Excel.

Remove Cell Formatting

Replace Inefficient Formulas

  • Avoid functions like LOOKUP, INDIRECT, OFFSETS, INDEX, MATCH.
  • Instead of referencing entire rows or columns, limit references to set ranges.
  • Avoid using “Defined Names” for ranges.
  • Avoid repeating volatile functions like TODAY and NOW. Instead, calculate the value once and reference that cell.

Little Things

  • Limit the number of Macros, Charts, and Shapes used.
  • Disable unnecessary COM add-ins.
  • Disable hardware graphics acceleration.
  • Remove unused custom styles.

File Size Management

Save as a .xlsb file.

Benefit: Significant file size reduction.

Drawback: Other applications may not be able to open the file

Do not save Pivot Table Source Data

Benefit: Decent file size reduction.

Drawback: Pivot Tables need to be refreshed before they can be used.

This needs to be applied to all pivot tables in a workbook individually. The following macro can apply this to all existing Pivot Tables. Credit to

Sub PTReduceSize()
    Dim wks As Worksheet
    Dim PT As PivotTable

    For Each wks In ActiveWorkbook.Worksheets
        For Each PT In wks.PivotTables
            PT.CacheIndex = 1
            PT.SaveData = False
End Sub


The Blog Part

In my role as a Workforce Management Analyst, we use Excel a lot. Sure, there are probably better tools out there for the data that we handle. But those tools have learning curves, and Excel works. See My team was regularly maxing out the RAM that 32 bit Excel could handle, and our IT department refused to install the 64 bit version (for some unexplained reason). We were constantly running up against memory errors, crashing systems, and various errors. To combat this, we would start copying data out of one sheet and into another one. Now we are now bloating all of our sheets and causing even more memory issues if we try to open multiple at once.

I initially put together this document in the team’s shared OneNote to help everyone manage their Excel experience. But I know that I’ll use this information later, and what is a blog for if not this? It’s not like I’m using it anyways.