How to fix a reference not valid in excel.

Cindy M 20 Reputation points
2026-08-29T11:38:38.97+00:00

I did some minor 'drawing' in an excel file and I clicked on it, and I get a reference not valid but I can't do anything it has locked excel completely, all gone grey and I cant exit, I cant delete the file, or do anything at all. Please help!

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

Answer accepted by question author

AI answer

2026-08-29T11:38:54.55+00:00

If Excel shows "reference not valid" and then freezes with the window grayed out, use this sequence:

  1. Force close Excel first Since Excel is unresponsive, close it with Task Manager.
    • Press Ctrl + Shift + Esc
    • Select Microsoft Excel
    • Choose End task
  2. Reopen Excel and test the workbook again If the problem happens only with that workbook, the issue is likely inside the file rather than Excel itself.
  3. Check for invalid references in the workbook A #REF! error means a formula refers to a cell that is no longer valid. This commonly happens when referenced cells were deleted or pasted over.
    • Look for cells showing #REF!
    • Review formulas that point to deleted or moved cells
    • If the workbook uses INDIRECT to another workbook, open the referenced workbook first, because INDIRECT to a closed workbook can return #REF!
    • If the workbook uses OLE links, start the linked program
    • If it uses DDE, verify the topic reference and check Trust Center Settings for external content
  4. If the freeze started after adding drawing objects, inspect file contents Excel performance and crashing can be caused by large numbers of shapes or complex shape objects, as well as hidden objects, excessive styles, or invalid defined names. Since the issue started after minor drawing changes, shapes in the workbook are a likely area to check.
  5. Update Excel There is a documented issue where Excel may prompt for file access and then hang or show a warning that it cannot open the file correctly. That issue was fixed in version 16.34 and later. Updating Excel is recommended.
  6. If the file opens but stays locked or read-only If the workbook is being co-authored or opened from a shared location, unsupported features can cause lock behavior. The file owner can try:
    • Turning off the Shared Workbook feature
    • Removing password encryption or restricted access from File > Info > Protect Workbook
    • Turning off Refresh data when opening file on tables and PivotTables
    • Disabling Excel add-ins from File > Options > Add-Ins > Excel Add-ins > Go
  7. If the error appears while creating or using a PivotTable If the workbook filename contains square brackets such as [ ], Excel can show "Data source reference is not valid". Rename the workbook to remove invalid characters.

If Excel freezes again immediately when opening that file, the safest next check is whether the workbook contains broken formulas, external links, or shape objects added during the drawing changes.


References:

AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Newest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.