The Excel error "Object reference not set to an instance of an object" usually comes from a broken add-in, a corrupted workbook, or a damaged Excel installation rather than from your data itself. In most cases you can fix it by starting Excel in safe mode, disabling add-ins one by one, and repairing Office. This guide walks through those steps in order, starting with the simplest fixes, so you can get Excel opening and running normally again.
What You'll Need
- A Windows PC with Microsoft Excel (desktop version) installed
- Administrator rights on the computer, or permission to run the Office repair tool
- A few minutes; the Office repair step can take longer depending on your installation
- Your Office account details (the email and password you used to activate Office), in case a repair asks you to sign in again
Step-by-Step
- Save your work and note when the error appears. Does it pop up when Excel opens, when you open one specific file, or when you use a particular command? This tells you whether the problem is Excel itself, an add-in, or a single workbook.
- Restart your computer. A pending Windows or Office update that is half-installed can cause this error. Reboot, let updates finish if any are pending, then try Excel again.
- Start Excel in safe mode. Close Excel completely, press the Windows key + R, type
excel /safeand press Enter. Safe mode starts Excel without add-ins. If the error does not appear in safe mode, an add-in is almost certainly the cause, so continue to the next step. If the error still appears, skip to step 7. - Open the add-ins list. In normal Excel, go to File > Options > Add-ins. (Menu labels can differ slightly between Office versions, but this path is standard on current Windows versions of Excel.)
- Disable COM add-ins one at a time. At the bottom of the Add-ins window, next to "Manage", select COM Add-ins and click Go. Uncheck the first add-in, click OK, restart Excel, and check whether the error is gone. Repeat, unchecking one add-in each time, until you identify the culprit. Common offenders are PDF toolbars, old antivirus integrations, and third-party finance or data plugins.
- Re-enable the rest and update or remove the problem add-in. Once you find the add-in causing the error, either update it to the latest version from the vendor's official site, remove it via Windows Settings > Apps, or leave it disabled. Re-enable the other add-ins you unchecked.
- Test whether one workbook is the problem. If the error only appears with a specific file, that workbook may be corrupted. Open Excel with a blank workbook, then use File > Open > Browse, select the problem file, click the arrow on the Open button and choose Open and Repair. Choose "Repair" first; if that fails, repeat and choose "Extract Data", which recovers values and formulas but loses formatting and some features.
- Update Office. In Excel, go to File > Account > Update Options > Update Now. Install any updates found, restart Excel, and test again.
- Repair Office. Close all Office apps. Open Windows Settings > Apps, find your Microsoft Office entry, click it and choose Modify. Try "Quick Repair" first; it fixes most issues without touching your files. If the error persists, run Modify again and choose "Online Repair", which reinstalls Office. Neither option deletes your documents, but Online Repair takes longer and needs an internet connection.
- Check your antivirus integration as a last add-in step. If the error started after a security software change, open your antivirus settings and look for its Microsoft Office or Excel integration/scanning option, and disable that integration temporarily to test. Re-enable it if it makes no difference.
Common Mistakes
- Disabling all add-ins at once. This hides which one is responsible, so you cannot re-enable the rest safely. Test one at a time.
- Skipping safe mode. If the error does not appear in safe mode, repairing Office will rarely help, because the problem is an add-in, not Excel itself.
- Choosing "Extract Data" before trying "Repair". Extraction is the more destructive option and should only be used when Repair fails, because it discards formatting, charts and some formulas' structure.
- Running Online Repair with other Office apps open. Close everything first, or the repair can fail or require a restart mid-way.
- Downloading "fix-it" tools from random websites. Use only the built-in Office repair or Microsoft's own support pages.
Tips
- Keep a note of which add-ins you disable and in what order, so you can reverse everything exactly.
- If a third-party add-in is the cause and no update fixes it, check the vendor's official support page; they often have specific guidance for this error.
- If the error appears while running a macro or VBA code, the code itself is likely referencing an object that was not set, for example a worksheet, range or workbook variable that is Nothing. In that case the fix belongs in the code, not in Excel's settings.
- Set Excel to save AutoRecover information frequently (File > Options > Save) so a crash caused by this error costs you less work.
Troubleshooting
If the error appears even in safe mode: the problem is inside Excel or Office itself rather than an add-in, so run Quick Repair, then Online Repair (steps 8 and 9 above).
If the error only affects one file: try opening it on another computer. If it opens there, the file is fine and your Excel setup is at fault. If it fails everywhere, the workbook is damaged; use Open and Repair, or recover data from a previous AutoRecover version via File > Info > Version History if the file is stored in OneDrive or SharePoint.
If the error started right after a Windows update: check for a follow-up Office update, and if nothing helps, you can temporarily pause updates in Windows Settings > Windows Update while you confirm the cause, then resume them once resolved.
If repair fails or the error persists after Online Repair: sign out of Office (File > Account), restart, sign back in, and test. As a final step, uninstall Office from Windows Settings > Apps and reinstall it from your Microsoft account page at account.microsoft.com, signing in with the account that owns your license. Your documents are not deleted by uninstalling Office.
Frequently Asked Questions
What does "Object reference not set to an instance of an object" actually mean?
It is a generic programming error meaning a piece of code tried to use something that does not exist or failed to load. In Excel it is usually triggered by a faulty add-in, a damaged file, or a broken Office component.
Will repairing Office delete my Excel files?
No. Quick Repair and Online Repair only fix the Office programs themselves. Your spreadsheets, whether on your PC or in OneDrive, are untouched.
Why does Excel work fine in safe mode but fail normally?
Safe mode disables add-ins, so a difference in behaviour points directly to a COM add-in as the cause. Follow steps 4 to 6 to isolate it.
Can this error be caused by a macro?
Yes. If it appears when you run a specific macro, the VBA code is trying to use an object variable that was never assigned, which produces the same message. The macro's code needs fixing, or an updated version from whoever wrote it.
Is this error a sign of a virus?
Usually not, but malicious add-ins can occasionally cause it. If the behaviour is strange, run a full scan with Windows Security and check File > Options > Add-ins for anything you do not recognize.
Does this error affect Excel on the web or Mac?
The message is specific to Excel on Windows, because it comes from the .NET components and add-ins used there. The steps in this guide apply to the Windows desktop version.