When Excel shows a "Not enough memory" error, it usually means the workbook has exceeded Excel’s memory limits—often due to excessive data, large formulas, or add-ins—not that your PC is truly out of RAM. The fix involves optimizing the file, closing other applications, or adjusting Excel’s settings to reduce its memory footprint.
What You'll Need
- Your Excel workbook (the one causing the error)
- Access to Windows Task Manager (Ctrl+Shift+Esc)
- Administrator rights (for some troubleshooting steps)
- Optional: A backup of your workbook before major changes
Step-by-Step
- Save and close the workbook immediately after seeing the error. Click File > Save As to create a backup copy, then close Excel completely. This prevents corruption from incomplete saves.
- Restart Excel in safe mode to rule out add-in conflicts. Press Windows + R to open Run, type
excel /safe, and hit Enter. If Excel opens without the error, a third-party add-in is likely the culprit. Go to File > Options > Add-ins, select COM Add-ins from the dropdown, uncheck all, then restart Excel normally. - Reduce open workbooks and background apps. Close all other Excel files and heavy programs (browsers with many tabs, design software, video players). Open Task Manager (Ctrl+Shift+Esc), go to the Processes tab, and end any non-essential tasks using high memory.
- Break up large worksheets. Split data across multiple sheets or workbooks. Move unused sheets to a separate file, delete hidden or very wide columns (e.g., entire columns beyond column Z), and avoid using entire-column references like
A:Ain formulas. - Replace volatile formulas. Functions like
INDIRECT,OFFSET,RAND, andNOWrecalculate constantly and consume memory. Replace them where possible: useXLOOKUPinstead ofVLOOKUPwith full-column ranges, or hard-code static values for one-time calculations. - Turn off automatic calculation to reduce strain during editing. Go to Formulas > Calculation Options > Automatic Exceptions > Manual. After editing, switch back to Automatic only when ready to recalculate. This prevents Excel from refreshing on every keystroke.
- Clear clipboard and undo history. Press Ctrl+Alt+Del, open Task Manager, end all Excel processes, then restart Excel. Paste nothing into the workbook immediately—Excel clears its undo stack on restart, freeing memory.
- Save in .xlsx format if using .xls. Older .xls files (Excel 97–2003) have stricter row/column limits and less efficient memory use. Go to File > Save As, choose Excel Workbook (*.xlsx), and overwrite the original after confirming the new file works.
- Increase virtual memory (Windows). Right-click This PC > Properties > Advanced system settings > Performance > Settings > Advanced > Virtual memory > Change. Uncheck Automatically manage paging file size, select your drive, choose Custom size, set Initial size to 1.5× your RAM (e.g., 12,288 MB for 8 GB RAM), and Maximum size to 3×. Click Set, then OK, and restart your PC.
- Repair the workbook. In Excel, open a blank workbook. Go to File > Open > Browse, select your file, click the arrow next to Open, and choose Open and Repair. This can recover data from corrupted files and reset memory-heavy metadata.
Common Mistakes
- Ignoring hidden objects: Charts, shapes, or slicers on sheets consume memory even when not visible. Press Ctrl+End to jump to the last cell—then delete any unused rows/columns or right-click sheet tabs > Move or Copy to copy only values to a new sheet.
- Using entire-column ranges in conditional formatting: Selecting column A instead of A2:A10000 forces Excel to evaluate millions of cells. Always limit ranges (e.g.,
=A2="Pending"applied to=$A$2:$A$10000). - Leaving external links active: Data connections to Power Query or web sources refresh on open. Go to Data > Queries & Connections, right-click each query, and disable Refresh on open.
- Assuming more RAM always fixes it: Excel 32-bit (the default) maxes out at ~2 GB memory per instance—even on a 64 GB RAM PC. If you’re on 32-bit Excel, switch to 64-bit via Microsoft Account > Install Office > Other > Office Tools > Office Language and Installation Settings.
Tips
- Use Power Query for large datasets: Load data from CSVs or databases into Power Query (Data > Get Data), clean it there, then load to a worksheet. This shifts memory-heavy processing out of the workbook.
- Compress pictures: Select an image > Picture Format > Compress Pictures > Delete cropped areas > OK. This slashes file size without quality loss for web use.
- Disable hardware graphics acceleration: File > Options > Advanced > Display this page for all new worksheets > uncheck Disable hardware graphics acceleration. This helps on older or underpowered devices.
- Limit pivot table size: Refresh pivot tables manually and remove unused fields. Right-click a pivot table > PivotTable Options > Data > set Number of items to retain per field to None.
- Use Excel Online for light editing: Upload to OneDrive and open in a browser. Excel Online uses less memory than desktop Excel for basic tasks like viewing or small edits.
Troubleshooting
If the error persists after all steps:
- Check for add-ins that hide in Task Manager: Some add-ins (like Adobe PDF or OneNote) load silently. In Safe Mode (step 2), enable add-ins one-by-one to isolate the culprit.
- Test with a minimal workbook: Create a new blank workbook, paste just 10 rows of data, and copy your largest formula there. If it works, the issue is in your original file’s structure—not Excel itself.
- Verify Excel version: Go to File > Account > About Excel. If it says 32-bit, consider upgrading to 64-bit Excel (available for Microsoft 365 subscribers). Note: 64-bit may break legacy VBA macros.
- Repair Office installation: Go to Settings > Apps > Microsoft 365 Apps > Modify > Quick Repair. If that fails, choose Online Repair (will reset settings but preserve files).
- Check file size limits: Excel’s hard limit is 256 MB for .xlsx files. If your file exceeds this, split it. Use File > Info > Properties > Advanced Properties > Statistics to see the size.
Frequently Asked Questions
Why does Excel say “not enough memory” even though my PC has 16 GB RAM?
Excel 32-bit (the default install) can only use up to 2 GB of memory per instance—regardless of your total RAM. Switching to 64-bit Excel removes this cap.
Can a corrupted file cause this error?
Yes. Corruption in sheet metadata, charts, or embedded objects can bloat memory usage. Use File > Open > Browse > Open and Repair to fix it.
Does disabling hardware acceleration help?
It can, especially on older laptops. Go to File > Options > Advanced and check Disable hardware graphics acceleration. Restart Excel after changing this.
How do I find which formula is using the most memory?
Temporarily break your workbook: copy each sheet to a new file, one at a time. When the error disappears, the last sheet added is the problem. Then isolate volatile functions like INDIRECT or large array formulas.
Will saving as .xlsb help?
Possibly. The binary format (.xlsb) is more compact and loads faster for large files. Try File > Save As > Excel Binary Workbook (*.xlsb). If it opens without errors, keep this version.
Is there a way to increase Excel’s memory limit without reinstalling?
No—Excel’s memory ceiling is hardcoded by its bit version (32-bit vs 64-bit). The only fix is installing 64-bit Excel (if your system supports it) or splitting your data across multiple files.