Solved - The File is Corrupted and Cannot be Opened - Excel 2021 | Stellar

Solved - The File is Corrupted and Cannot be Opened - Excel 2021 | Stellar

Ian Lv13

Solved - The File is Corrupted and Cannot be Opened - Excel

Summary: Unable to open Excel file due to the error ‘The file is corrupted and cannot be opened’? Read this blog to find more details about the error, possible reasons behind it, and solutions to fix the error. In addition, the blog mentions about Stellar Repair for Excel software that can help fix the Excel error in a few clicks. Download the software now and see free preview of the file.

Free Download for Windows

About the Error

Microsoft Excel is a widely used spreadsheet application that comes bundled with MS Office. Users tend to update the application with new security patches and features. Sometimes these updates can cause problems, and result in “The file is corrupted and cannot be opened” error.

The File is Corrupt and Cannot be Opened Error Message

Figure 1 – Excel File Corrupted Error Message

Other Possible Reasons behind ‘The File is Corrupt and Cannot Be Opened’ Excel Error

  • Opening an older Excel version file in a newer version of Excel. For instance, opening Excel 2013, 2010, or earlier versions in Excel 2016.
  • When attempting to open a Microsoft Office (Excel) email attachment in Microsoft Outlook 2010, MS Office 2010 reports a problem with the file preventing it from opening.

How to Fix the ‘Excel File is Corrupt and Cannot Be Opened’ Error?

Here are a few possible solutions that you can try to fix the ‘Excel file is corrupt and cannot be opened’ issue and open your Excel file.

Solution 1: Changing Component Services Settings

Solution 2: Changing the Protected View Settings

Solution 3: Repair Excel Files using Excel Repair Software

Solution 1: Changing Component Services Settings

[Caution] Changing Component Services settings requires making changes to the registry, and any mistake can harm your computer.

Follow these steps to change ‘Component Services’ settings:

  • Click ‘Start’ or ‘Win+R’ and type ‘dcomcnfg’ and press ‘Enter’.

  • In the navigation pane, expand the ‘Component Services’, and then expand ‘Computers’.


Changing Component Services Settings

Figure 2 – Component Services Settings

  • Next, right-click on ‘My Computer’, and then click ‘Properties’.

When the ‘My Computer Properties’ dialog box appears, click on the ‘Default Properties’ tab and then set the following values:

  • Default Authentication Level: Connect
  • Default Impersonation Level: Identify

My Computer Properties

Figure 3 – Illustrates My Computer Properties

  • Click ‘OK’ to change ‘Default Properties

Solution 2: Changing the Protected View Settings

[Caution] Disabling the ‘Protected View’ can put your system at high risk. Viruses attached to the Excel files can attack and infect your system. Be careful before using this option.

Excel 2010 file cannot open due to the ‘Protected View’ setting in Microsoft Outlook 2010. And so, changing the setting may help fix the error. For this, perform these steps:

  • Open MS Excel 2010, go to the ‘File’ menu and click ‘Options’.

Select Options in Excel 2010

Figure 4 – Options

  • When the ‘Excel Options’ window opens, click on ‘Trust Center’ and then on ‘Trust Center Settings’.

Trust center settings in Excel

Figure 5 – Open Trust Center Settings

  • Next, choose ‘Protected View’ and uncheck all the options including ‘Enable Protected View for Outlook attachments’ if you use Outlook for email.

change protected view settings

Figure 6 – Uncheck Protected View Settings

  • Click ‘OK’. Restart the application and try opening the Excel file again.

If none of the above solutions works for you, your Excel file is likely severely corrupt. To repair corrupt Excel files, you need to use advanced options like Stellar Repair for Excel tool. It repairs corrupt and damaged Excel files and helps in retrieving lost data.

Solution 3: Use Excel File Repair Tool

Considering the risks associated with the above solutions, it’s better to use an Excel repair tool to repair single or multiple corrupt Excel files at once. The process is simple, and even a novice can use the Excel file repair tool to repair Excel files with the help of the following steps:

  • Download Stellar Repair for Excel and install it.

Free Download for Windows

  • Launch the tool. In the tool’s main interface, click ‘Browse’ to select the file. If you don’t know the file location use the ‘Search’ option.

Browse and Search

Figure 7 – Illustrates Selecting Corrupt Excel File in Stellar Repair for Excel

  • Select the file, and then click on Repair.

select corrupt file and repair

Figure 8 – Illustrates Initiating Excel File Repair in Stellar Repair for Excel

  • The software scans and lists the Excel file in the left pane. Click on the file to preview its recoverable objects in the right pane.

preview recoverable excel objects

Figure 9 – Illustrates Preview of Recoverable Excel File Objects

  • Save the repaired file at either the default location or a user-specified location.

select repaired file location

Figure 10 – Illustrates Saving Repaired Excel File in Stellar Repair for Excel

  • Click ‘OK’ to save the repaired Excel file. After the repair process is completed, browse to the location and open it with MS Excel 2010 or any other version.

repaired file saved Dialog Box

Figure 11 – Illustrates Saving Complete Message in Stellar Repair for Excel

You will be able to access your Excel file from the selected location.

Conclusion

You can use the first two possible solutions to fix the “The file is corrupted and cannot be opened” error. If you can access the file, save its data and restore the default settings. However, if the file is corrupt and the data retrieved using the first two solutions is inconsistent or incomplete, use Stellar Repair for Excel. This tool can help you recover Tables, Charts, Chart Sheets, cell comments, Images, and Formulas while preserving the worksheet properties and cell formatting. You can also preview the file and verify the data inside the file before saving it.

Get Rid of corrupt Excel File

Summary: What to do when an Excel file is corrupted? This is a common question that is often asked by Microsoft Excel users. If you too are seeking an answer to this question, read the blog to learn about a few manual workarounds and a specialized Excel file repair tool to resolve the Excel file corruption issue.

Free Download for Windows

An Excel file gets corrupted due to various reasons such as a virus/malware attack, sudden system shutdown when the Excel file is still open, power failure while working with an Excel spreadsheet, etc.

When Microsoft Excel detects corruption in a workbook, it attempts to repair the workbook by starting ‘File Recovery mode’.

Tip! If the file recovery mode doesn’t start, you may use the manual repair process or an Excel repair tool, such as Stellar Repair for Excel to repair a corrupted Excel file. The software can help you quickly retrieve contents from a damaged, corrupt, or inaccessible Excel file and restore the file to its original state.

There even exist a few manual tips that can be used to recover data from damaged MS Office Excel files.

Workarounds to Use When an Excel File is Corrupted

Note: Before carrying out any of the repair and recovery workarounds, it is advised that you must save a backup copy of the damaged file. This is to prevent your files from turning completely inaccessible in case the methods fail to give desired results.

Workaround 1: Use the Open and Repair Method

If MS Excel cannot repair a corrupted workbook automatically, you can try to do it manually. To do so, perform the following:

  • Open the corrupt file, like you normally open any file, by clicking File > Open.
  • Browse and locate the folder containing the corrupted document.
  • When the Open dialog box is displayed:
  • Select the Excel document.
  • Click on the arrow present to the right side of the Open button and select Open and Repair option.

open and repair excel file

Figure 1 – Open and Repair Feature

If this doesn’t help repair the broken Excel file or you encounter  Open and Repair does not work issue, proceed with the next workaround.

Tip! Try an alternative solution, i.e. Stellar Repair for Excel software to repair and recover corrupt Excel files (.xlsx or .xls) when the ‘Open and Repair’ method won’t work.  

Workaround 2: Restore an Excel File with a Shadow Copy

If you’re a Windows 7 or Vista user, you can try restoring the corrupted spreadsheet by using a shadow copy (or a previous version). [Shadow copy](https://en.wikipedia.org/wiki/Shadow_Copy#:~:text=Shadow%20Copy%20(also%20known%20as,the%20Volume%20Shadow%20Copy%20service .) is basically a snapshot (backup copy) of computer files or volumes. The snapshot may contain an older version of your Excel file that has become damaged now. To find out, do the following:

  • Launch File Explorer, and right-click the folder in which the file is saved.
  • Choose Properties.
  • Look for and click the Previous Versions tab. This will display a list of entries under Folder versions or File versions, going back a few days or weeks.
  • Double-click one with a date when the file was accessible and could be read. Then, try to open its older version. If it opens, save the older version with a new name and execute the procedure with new file/folder entries.

Excel file is corrupted

Figure 2 – Volume Shadow Copy

You would have to repeat the process until you reach the point where the file became damaged. With this, you will get a baseline version of the file, but data may still have been lost.

Workaround 3: Test your Assumptions

If you receive a message saying “Excel file corrupted and cannot be opened”, you would probably believe it. However, there could be other reasons besides corruption that may cause Excel to throw this error message.

Your Office suite, which Excel is a part of, maybe having some primary issues in it causing problems while opening one Excel document. So, try opening another Excel file to check if the problem exists with all the files or just one.

If other Excel documents work correctly, it means that only the particular document is corrupt. On the contrary, if the issue is with your Office suite, repairing the current Office installation may help fix the issue. For this, perform these steps:

  • Go to Control Panel and click Uninstall the Program.
  • Choose Office.
  • Click Change, and hit the Repair button.

You can reinstall the entire Office package. Once reinstalled, try to open the file to check if the issue has been fixed and the Excel file repaired.

Excel file is corrupted

Figure 3 – MS Office Repair

Workaround 4: Use Excel File Repair Tool

If the above manual solutions fail, use Excel repair software to successfully repair your damaged Excel workbook and recover all its data. Essentially, the software rebuilds damaged Excel workbook data at a granular level to recover every single object & all the original properties of the workbook.

Suggested Read: How to repair corrupt Excel files using Stellar Repair for Excel?

Why Use Stellar Repair for Excel Software?

  • Repairs severely corrupted XLSX and XLS files.
  • Can handle corrupt Excel files of any size.
  • Demo version allows previewing recoverable Excel file items for free.
  • Supports Microsoft Excel 2019 and all lower versions.
  • Compatible with Windows 10 and lower versions.
  • Tested and recommended by Microsoft Excel MVPs.

Free Download for Windows

Final Word

When an Excel file is corrupted, it won’t open at all or you won’t be able to access all the file data. Such a situation can lead to unnecessary halts, impacting work productivity.

There are manual workarounds that may help fix the corrupt Excel file and recover its data, such as the ones covered in this blog. However, these solutions might not work in severe corruption cases and may require technical assistance. Also, they may result in some data loss.

To overcome the limitations of manual workarounds, it is recommended to go for a professional Excel file repair tool such as Stellar Repair for Excel . It helps repair corrupt Excel (XLS or XLSX) files and restores all worksheet data, such as the table, chart, chart sheet, cell comment, sort and filter, image, formula, etc. in a few simple clicks. Moreover, the software provides a free preview of the recoverable data with its demo version. You can check the preview to evaluate how the software works.

[Solved] Excel Spreadsheet Disappears after Opening

Several Excel users have reported about experiencing ‘Excel spreadsheet disappears after opening’ issue. The problem occurs when attempting to open an Excel file by double-clicking on the file icon or name. The Excel file opens blank grey screen.

Excel blank screen

Figure 1 - Excel Blank Screen

User Instances of ‘Excel Open But Can’t See Spreadsheet’ Issue

Instance 1: The user said that “Excel 2016 opens to a blank screen and everything is greyed out. Ribbons at the top of Excel are also not present”.

Instance 2: The user reported that “Attempting to open a spreadsheet, either by double-clicking the file or by opening Excel, it opens but only a blank Excel window is visible. When trying to save that particular file, Excel behaves as though there is no file open at all and all the file saving options, such as save, save as, print, etc. are greyed out.”

Causes Behind ‘Excel Open But Can’t See Spreadsheet’ Issue & the Solutions Thereof

Following are some of the possible reasons behind the ‘Excel open but can’t see spreadsheet’ issue, along with their solutions:

Cause 1: Excel File is Hidden

You may have saved the Excel sheet as a hidden document.

Solution: Unhide Excel File

Verify if your Excel worksheet is hidden by following these steps:

  • In Excel, click the View tab, and then click Unhide.

Note: If the ‘Hide’ tab under the View menu is greyed out, the sheet you’re trying to open is not hidden. In that case, proceed to the next workaround.

unhide excel file

Figure 2 - Unhide Excel File

  • A dialog box will pop-up showing the worksheet name that can be unhidden. For instance, below is an image of Unhide box that lists ‘Daily_Reports’ spreadsheet under Unhide workbook.

unhide excel workbook

Figure 3 – Select and Unhide Excel Workbook

  • Click OK to unhide your Excel sheet.

If this fails to work, there’s a possibility that the spreadsheet window pane may have slided to one side of the visible desktop. To bring back the displayed area, click the ‘Arrange All’ option under the View tab. If the issue persists, try the next solution.

Cause 2: Ignore Dynamic Data Exchange (DDE) Option is Enabled

Another reason behind the ‘Excel opens to a blank screen’ issue could be that the “Ignore other applications that use Dynamic Data Exchange (DDE)” checkbox is checked in Excel options.

Usually, when you double-click an Excel file, a DDE message is sent to Excel instructing it to open that particular file. But, if you have the ‘Ignore DDE’ option selected, the DDE message sent to Excel to open a workbook is ignored. As a result, the Excel workbook opens a blank screen.

Solution: Uncheck the Ignore DDE Option

Make sure that the ‘Ignore DDE’ option is unchecked by performing these steps:

Note: Skip these steps for Excel 2019 and Excel Office 365.

  • In your Excel window, click File > Options.

Excel options

Figure 4 - Select Excel Options

  • From the left-side of the ‘Options’ window, choose Advanced.

Excel Options Window

Figure 5 - Excel Options Window

  • In ‘Advanced’ window, locate the General section, and then uncheck the “Ignore other applications that use Dynamic Data Exchange (DDE)” checkbox.

uncheck ignore DDE

Figure 6 - Uncheck Ignore Other Applications that use DDE

  • Click OK to apply the changes.

If these steps don’t work, proceed to the next workaround.

Cause 3: Issue within Office Program

Sometimes, problem within your Microsoft Office program might cause Excel to behave oddly and may result in an Excel spreadsheet disappeared issue.

Solution: Repair Office Program

Try repairing your Office program by executing the steps listed below, based on your Windows OS:

For Windows 10:

  • Type Settings in the Windows search box.
  • Click Settings.
  • In ‘Windows Settings’ screen, select Apps.

Windows settings screen

Figure 7 - Windows Settings Screen

  • In ‘Apps & features’ screen, scroll down to your Microsoft Office program and tap on it, and then click the Modify

modify MS Office program

Figure 8 - Modify MS Office Program

  • In ‘How would you like to repair your Office programs’ dialog box, select the Online Repairradio button, and then click the Repair

repair MS Office program

Figure 9 - Repair MS Office Program

For Windows 8:

  • Open Control Panel and click the Uninstall a program option under Programs.
  • Select Microsoft Office 365 and then click Change.
  • In the window that opens, select Online Repair and then hit the Repair

You may be asked to restart your system after completion of the repair process.

For Windows 7:

  • In ‘Control Panel’ window, double-click Programs and Features.
  • Under Uninstall or change a program section, select the Office program, and then select Change.
  • In the dialog box that appears, choose Online Repair and then choose Repair.

If repairing your Office installation fails to resolve the issue, continue to solution 4.

Cause 4: Problematic Excel and COM Add-ins

Sometimes, Excel and COM add-ins may cause Excel file open a blank grey screen problem.

Solution: Disable the Add-ins

Disabling the Excel and COM add-ins one at a time may help resolve the problem. The steps are as follows:

  • Click the File menu in your Excel file and select
  • From ‘Excel Options’ left-side panel, click Add-Ins, and then choose COM Add-ins from the ‘Manage’ drop-down. Click the Go

COM Add-ins

Figure 10 - Select COM Add-ins

  • Uncheck one of the add-ins checkbox from the COM Add-ins window, then select OK.

disable COM Add-ins

Figure 11 - Uncheck and Disable COM Add-ins

  • Restart your Excel program.

If the issue persists, repeat the above steps (1 till 4), except that you need to choose a different add-in in step 3.

If you’re still experiencing the same problem after unchecking all the COM add-ins, repeat all the above steps, except choose ‘Excel Add-ins’ in step 2.

If Excel can load the file, then the add-in that you disabled last leads to the problem. If turning off add-ins does not work, try the next solution.

Cause 5: Problem with Excel File Associations

The Excel file opening a blank screen problem may occur if the file associations are not performing correctly.

Solution: Reset Excel File Associations

Try resetting the file associations in Excel to their default settings. For this, follow the below steps based on your OS.

For Windows 10 and Windows 8.1:

  • Select the file that is opening incorrectly and copy it to the desktop.
  • Right-click the file and click Properties.
  • In the File’s ‘Properties’ window, check your file type next to Type of Filefrom the General tab. For instance, (.docx), (.csv), or (.pdf).
  • Next, check to which app your file is associated with from the Opens withoption

If the file type is different than .xlsx, open the file in a different application by following these steps:

  • Click the Change button next to the ‘Opens with’ option.
  • Click More apps.
  • From the list of applications, select the desired app and then check the Always use this app Click OK.

For Windows 8:

  • Open Control Panel, click Default Programs, and then select Set your default programs.
  • Choose Excel and then tap the Choose default for this program
  • In ‘Set Program Associations’ window, choose Select All and then click Save.

For Windows 7:

  • In Control Panel, choose Default Programs.
  • Click the Associate a file type or protocol with a specific program
  • Choose Microsoft Excel Worksheet and click on change program.
  • Choose Microsoft Excel under Recommended Programs.
  • If you’re unable to find Excel, browse the Excel installation folder.
  • Select exe and then choose Excel.

What Next? Use Stellar Repair for Excel to Recover Your File

If the above solutions don’t help recover your Excel file, use an Excel file repair tool, such as Stellar Repair for Excel to recover it. The software can restore the Excel spreadsheet and its components, including tables, pivot tables, charts, formulas, etc. while preserving the spreadsheet properties and formatting.

Free download Stellar Repair for Excel

Check out the video to recover Excel file by using Stellar Repair for Excel software.

Conclusion

This article described the possible causes behind the ‘Excel open but can’t see spreadsheet’ issue, along with their solutions. The manual solutions to resolve the issue require time and efforts. But, if you need to access your Excel file without any delay, use Stellar Repair for Excel software to recover your .xlsx/.xls file in just a few clicks.

Solutions to Repair Corrupt Excel File

Summary: MS Excel can throw various errors due to corrupted Excel files. This blog discusses the error messages that indicate Excel file corruption and the methods to prevent data loss due to a corrupt file. It also discusses the reasons behind the corruption in Excel file and their solutions. It also mentions a “Stellar repair for Excel” tool that can help to repair the corrupt or damaged Excel file.

Free Download for Windows

Is your Excel file corrupted? And you don’t have backup of your data? There is no need to worry. There are some simple solutions to repair Excel file 2019. But before heading towards the solutions, let’s discuss the possible reasons for Excel file corruption and how you can prevent losing your data.

Error Messages that Indicate Excel File Corruption

When an Excel file gets corrupted, different error messages appear. For example:

  • “Excel found unreadable content in . Do you want to recover the content of this workbook, click Yes.”
  • “Can’t find project and library.”
  • “The workbook cannot be opened or repaired by Microsoft Excel because it is corrupted.”
  • “Microsoft Excel has stopped working.”

Reasons Behind Excel File Corruption

The reasons for corruption in Excel file could be any of the following:

  • Improper system shutdown
  • Computer virus/malware attack/Hacker attack
  • Outdated anti-virus definition
  • Hardware failure
  • Unintentional deletion of files
  • Large Excel files
  • Bad sectors on storage media

How to Avoid Data Loss Due to Excel File Corruption?

Excel users should follow the below precautionary measures to prevent data loss due to Excel file corruption:

1. Create an Automatic Backup Copy

When you create an Excel spreadsheet, it is advised to Save As your document, as follows:

  1. In Save As window, click Tools next to Save option.
  2. Select General Options from the drop-down menu.
  3. Then check the dialogue box Always create back up and click OK.

Enable automatic backup by clicking Tools next to Save in the Save As window, choosing General Options, checking the Always create backup box, and clicking OK.

This will always create a backup of your Excel. If it’s deleted or corrupted at any time, it can be recovered.

2. Create Recovery File at Different Time Periods

Steps are as follows:

  1. Go to File and then click Excel Options.
  2. Click Save and then select the Save Auto Recover information every checkbox
  3. Add the required minutes and location. Ensure that Disable AutoRecover for this workbook only box is unchecked.

Access Excel Options from the File menu, navigate to Save, enable Save AutoRecover with specified minutes and location, and ensure the Disable AutoRecover for this workbook only box is unchecked.

Methods to Repair Corrupted Excel 2019 File

Try using these 5 methods to restore your Excel file and recover data:

Method 1: ‘Open and Repair’ Excel Files

Excel automatically opens the corrupted file in Recovery Mode. If not, you can repair Excel file manually through the following steps:

  • Click on the File and select Open.

File and select Open

  • Go to the location where the corrupt workbook is stored. In the Open window, select the corrupt file.
  • Click Open and then select Open and Repair.
  • In the window that opens, click Repair.

If the Repair option doesn’t work, you can select Extract Data and try to extract the values and formulae safely from the corrupt file.

Method 2: Recover Data from Open Workbook

If you face issues while working in an Excel file, you can choose to return to the last saved version of the Excel file. For this:

  • Click File. Then select Open.
  • Double click on the name of the workbook (the one that is open in your Excel).
  • Click Yes to reopen it.

Navigate to the File menu, select Open, double-click on the open workbook's name in Excel, and confirm by clicking Yes to reopen the workbook.

  • The workbook will now appear.

Please note that it will show the last saved version and changes made after that won’t be recovered.

Method 3: Set Calculation Option as Manual

You can also recover data from Excel workbooks that you’re unable to open. For this, you need to configure the calculation option as manual in Excel. You can do this through the following steps:

  • Click on File. Select New and open a Blank workbook.
  • From File, select Excel Options.

Microsoft Excel - Home Options

  • From the Formulas category, under the section Calculation options, select Manual. Now click OK.

Access the Formulas category, go to Calculation options, choose Manual, and confirm the changes by clicking OK.

  • Then click File, and select Open to open the corrupted or damaged Excel file.

You can also recover specifically the content (leaving formulas/calculated values) from the workbook by using external references (to link Excel workbook). For this:

  • Click on File, Select Open.
  • Navigate to the folder that contains the corrupted workbook.
  • Now, right-click on the file name of the corrupted workbook and click Copy.
  • Click File button. Then, select New and create another blank workbook.
  • In the first cell (A1), type =!A1 and press Enter.
    • Select the corrupted workbook in the Update Values dialogue (if it appears). Then click OK.
    • Select the relevant sheet in the Select Sheet dialogue (if it appears). Then click OK.

Microsoft Excel - Dialog box

  • Again, select the cell A1, go to Home and select Copy.
  • Now select (start from the cell A1) an area equal to that of the data in the original workbook.
  • Go to Home now and select Paste.
  • Again, go to Home, and Copy the data (the same selection of cells).
  • Go to Home, and then click on the arrow below Paste. Then click on Values.

By pasting values, you removed the links to the corrupted workbook and only the data is left behind.

Method 5: Excel Repair Software

If the above-mentioned methods do not help in repairing the corrupt Excel file, try an Excel repair software.

One of the most commonly used Excel repair tools is Stellar Repair for Excel. Its trial version is available for free download, which lets you scan and preview the repaired Excel files. Once you’ve ascertained the effectiveness of the software, you can save the file after activating the software.

Here’s the complete repairing process of the corrupt Excel file

Conclusion

This post shared the reasons behind Excel file corruption and precautionary measures to prevent data loss. It also outlined different methods to repair corrupt Excel file 2019. There are several in-built utilities in Microsoft Excel to repair corrupt workbooks and recover data from it. In case these methods didn’t work, you can use Stellar Repair for Excel – an easy-to-use DIY tool that can fix all Excel corruption errors and restore data with all original properties.

[Fixed] Excel VBA Runtime Error 9: Subscript Out of Range

Summary: The runtime error 9 in Excel usually occurs when you use different objects in a code or the object you are trying to use is not defined. This post will discuss the reasons behind the Excel VBA error “Subscript out of Range” and the solutions to resolve the issue. It will also mention an Excel repair tool that can help fix the error if it occurs due to corruption in worksheet.

Free Download for Windows

Many users have reported encountering the error “Subscript out of range” (runtime error 9) when using VBA code in Excel. The error often occurs when the object you are referring to in a code is not available, deleted, or not defined earlier. Sometimes, it occurs if you have declared an array in code but forgot to specify the DIM or ReDIM statement to define the length of array.

Causes of VBA Runtime Error 9: Subscript Out Of Range

The error ‘Subscript out of range’ in Excel can occur due to several reasons, such as:

  • Object you are trying to use in the VBA code is not defined earlier or is deleted.
  • Entered a wrong declaration syntax of the array.
  • Wrong spelling of the variable name.
  • Referenced a wrong array element.
  • Entered incorrect name of the worksheet you are trying to refer.
  • Worksheet you trying to call in the code is not available.
  • Specified an invalid element.
  • Not specified the number of elements in an array.
  • Workbook in which you trying to use VBA is corrupted.

Methods to Fix Excel VBA Error ‘Subscript out of Range’

Following are some workarounds you can try to fix the runtime error 9 in Excel.

Method 1: Check the Name of Worksheet in the Code

Sometimes, Excel throws the runtime error 9: Subscript out of range if the name of the worksheet is not defined correctly in the code. For example – When trying to copy content from one Excel sheet (emp) to another sheet (emp2) via VBA code, you have mistakenly mentioned wrong name of the worksheet (see the below code).

1
2
3
4
5
6
7
8
Private Sub CommandButton1_Click()
Worksheets("emp").Range("A1:E5").Select
Selection.Copy
Worksheets("emp3").Activate
Worksheets("emp3").Range("A1:E5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

VBA Error Subscript Out Of Range-When Incorrect Name

When you run the above code, the Excel will throw the Subscript out of range error.

So, check the name of the worksheet and correct it. Here are the steps:

  • Go to the Design tab in the Developer section.
  • Double-click on the Command button.
  • Check and modify the worksheet name (e.g. from “emp” to “emp2”).

Modified Code From emp to emp2

  • Now run the code.
  • The content in ‘emp’ worksheet will be copied to ‘emp2’ (see below).

Content Copied From emp to emp2

Method 2: Check the Range of the Array

The VBA error “Subscript out of range” also occurs if you have declared an array in a code but didn’t specify the number of elements. For example – If you have declared an array and forgot to declare the array variable with elements, you will get the error (see below):

Runtime Error 9 When Not Declared Array

To fix this, specify the array variable:

1
2
3
4
5
6
7
Sub FillArray()
Dim curExpense(364) As Currency
Dim intI As Integer
For intI = 0 to 364
curExpense(intI) = 20
Next
End Sub

Method 3: Change Macro Security Settings

The Runtime error 9: Subscript out of range can also occur if there is an issue with the macros or macros are disabled in the Macro Security Settings. In such a case, you can check and change the macro settings. Follow these steps:

  • Open your Microsoft Excel.
  • Navigate to File > Options > Trust Center.
  • Under Trust Center, select Trust Center Settings.
  • Click Macro Settings, select Enable all macros, and then click OK.

Macro Settings In Trust Center

Method 4: Repair your Excel File

The name or format of the Excel file or name of the objects may get changed due to corruption in the file. When the objects are not identified in a VBA code, you may encounter the Subscript out of range error. You can use the Open and Repair utility in Excel to repair the corrupted file. To use this utility, follow these steps:

  • In your MS Excel, click File > Open.
  • Browse to the location where the affected file is stored.
  • In the Open dialog box, select the corrupted workbook.
  • In the Open dropdown, click on Open and Repair.
  • You will see a prompt asking you to repair the file or extract data from it.
  • Click on the Repair option to extract the data as much as possible. If Repair button fails, then click Extract button to recover data without formulas and values.

If the “Open and Repair” utility fails to repair the corrupted/damaged macro-enabled Excel file, then try an advanced Excel repair tool, such as Stellar Repair for Excel. It can easily repair severely corrupted Excel workbook and recover all the items, including macros, cell comments, table, charts, etc. with 100% integrity. The tool is compatible with all versions of Microsoft Excel.

Conclusion

You may experience the “Subscript out of range” error while using VBA in Excel. You can follow the workarounds discussed in this blog to fix the error. If the Excel file is corrupt, then you can use Stellar Repair for Excel to repair the file. It’s a powerful software that can help fix all the issues that occur due to corruption in the Excel file. It helps to recover all the data from the corrupt Excel files (.xls, .xlsx, .xltm, .xltx, and .xlsm) without changing the original formatting. The tool supports Excel 2021, 2019, 2016, and older versions.

[Fixed] Excel Found a Problem with One or more Formula

Summary: The error ‘Excel found a problem with one or more formula references in this worksheet’ may appear while saving the Excel workbook. It occurs when Excel found a problem with the formula used in the sheet. However, it may also occur when the Excel workbook gets damaged or corrupt. In this guide, we’ve explained the reasons that may lead to this Excel error and methods to resolve the error, by using various Excel options and a third-party Excel file repair software.

Free Download for Windows

If you are experiencing the ‘Excel found a problem with one or more formula references in this worksheet’ error message in the Excel workbook, it indicates that the Excel file is corrupt or partially damaged. However, it may also occur due to incorrect reference to a wrong cell or object linking, which is not working. The complete error message says,

‘Excel found a problem with one or more formula references in this worksheet. Check that the cell references, range names, defined names, and links to other workbooks in your formulas are all correct.’

Excel found a problem with one or more formula references

In any case, resolving the error is critical as it doesn’t let you save the file and may result in loss of information from the Excel workbook.

Reasons for Excel Formula References Error

A few reasons that may lead to such error are as follows,

  • Wrong formula or reference cell
  • Incorrect object linking or link embedding OLE
  • Empty or no values in named or range cells
  • Multiple Excel files (not common)

Methods to Resolve ‘Excel Found a Problem with One or More Formula References in this Worksheet’ Error

Following are a few methods that you can follow to fix Excel file that can’t be saved due to problems with one or more formula references in the worksheet.

Method 1: Check Formulas

If the problem has occurred in a large Excel workbook with multiple sheets, it’s quite hard to pinpoint the problem cell. In such cases, you can use the Error Checking option that runs a scan and checks for a problem with formulas used in the worksheet.

To run Error Checking in the Excel sheet, follow these steps,

  • Go to Formulas and click on the ‘Error Checking’ button

Error Checking

  • This runs a scan on the sheet and displays the issues, if any. If no issue is found, it displays the following message,

The error check is completed for the entire sheet.

In such a case, you can try saving the Excel file again. If the error message persists, proceed to the next method.

Method 2: Check Individual Sheet

The problem may also occur due to an issue with one of the sheets in the workbook. To find the faulty sheet and fix the problem, you can copy each sheet content in a new Excel file and then try to save the Excel file.

This will help you find the faulty sheet from the workbook that you can review. This method makes the entire process of troubleshooting Excel formula reference error quite easy and convenient.

In case the error is not fixed, you can back up the faulty sheet content and remove it from the workbook to save the Excel file.

When the Excel file contains external links with errors, MS Excel may display such error messages. To check and confirm if external links are causing the error, follow these steps,

  • Navigate to Data Tab > Queries & Connections > Edit Links
  • Check the links. If you find any faulty link, remove it and then save the sheet

Method 4: Review Charts

You can review the charts to check if they are causing the formula reference error in Excel. It may take a while based on the size of the Excel file. Sometimes, it’s not practically possible to track down which Excel chart object is causing the error. Thus, you need to check specific locations, such as:

  1. Check horizontal axis formula inside Select Data Source dialog box
  2. Check Secondary Axis
  3. Check linked Data Labels, Axis Labels, or Chart Title

Method 5: Check Pivot Tables

To check Pivot Tables, follow these steps,

  • Navigate to PivotTable Tools > Analyze > Change Data Source > Change Data Source…

Edit links

  • Check if any of the formula used is problematic. Sometimes small typo, such as misplaced comma, can lead to such problems in Excel. Thus, check each formula thoroughly and correct the formulas wherever needed.

Method 6: Use Excel Repair Software

When none of the methods resolve the error, then you can rely on advanced Excel repair software , such as Stellar Repair for Excel. It’s a powerful tool that is recommended by several MVPs and IT administrators for resolving common Excel errors, such as ‘Excel found a problem with one or more formula references in this worksheet.’

Stellar Repair for Excel

It repairs corrupt or damaged Excel (.xls/.xlsx) files, recovers Pivot tables, charts, etc., and save them in a new Excel worksheet. It helps Excel users, facing formula reference error, restore their Excel file without any risk of data loss, while preserving the sheet properties and formatting with 100% precision.

Conclusion

Although the error ‘Excel found a problem with one or more formula references in this worksheet’ can be resolved by using various options in MS Excel, it may lead to a partial loss of information. Thus, you must perform these operations after taking a backup of the Excel worksheet. Also, if the MS Excel options fail to resolve the problem, you can use an Excel file repair software, such as Stellar Repair for Excel. The software helps fix Excel file corruption and restores the information and data from corrupt or damaged Excel files (.xls/.xlsx) to a new worksheet.

File Format and Extension of [filename] don’t Match in Excel File

Summary: The “File format and extension of [filename] don’t match. The file could be corrupted or unsafe” error message indicates that the Excel file you’re trying to open is unsupported, unsafe, or corrupted. Read this article to learn more about this error and how to fix this error. It also mentions an advanced Excel recovery tool to repair the corrupted Excel file and retrieve all its data in a few clicks.

Free Download for Windows

You can encounter the “File format and extension of [filename] don’t match. The file could be corrupted or unsafe” error when the Excel application detects any issue with the file. This happens when you try to open an old version file format in a newer version or if the file is received from an unsafe destination. This can prevent you from opening the Excel file.

As indicated from the error message, this error occurs due to the following reasons:

  • The file has incorrect file extension.
  • The file is corrupted.
  • The file you are trying to open is protected.

Now, let’s see how to resolve this Excel error.

Methods to Fix the “File format and extension of [filename] don’t match” Error

Try the following methods to troubleshoot the “File format and extension don’t match” error in Excel.

Method 1: Rename the Excel File

You can face the “File format and extension don’t match” issue if the file has incorrect extension. It can occur if the file extension has been altered or you’ve mistakenly saved the file with incorrect extension. To fix this, you can try renaming the Excel file with the correct file extension.  

Method 2: Check the Default Excel File Format

Different versions of Microsoft Excel use different default file formats. For example, .xls is the default file format of older versions (2003 and lower) of Excel, whereas .xlsx format is used by the newer versions (2007 and later). Opening the Excel file with an incompatible extension can cause the “File format and extension don’t match” issue. You can check the Excel version you are using and ensure it’s compatible with the Excel file you are trying to open.

Method 3: Change the Protected View Settings

You may receive the “File format and extension of excel don’t match” error if the Excel file is protected. You can check and try disabling the Protected View settings .  

Caution: Changing the Protected View settings can put your system at risk. If the Excel file is being downloaded from the internet, it may contain viruses that can infect your system. So be careful before disabling the Protected View settings.

Steps to Change Protected View Settings in Excel:

  • In the Excel’s File menu, click on Options.
  • Select Trust Center > Trust Center Settings.

Go to Trust Center and then click Trust center settings.

  • Under Trust Center, select Protected View and disable the below three options:
  • Enable Protected View for files originating from the internet.
  • Enable Protected View for files located in potentially unsafe locations.
  • Enable Protected View for Outlook attachments.

In the Trust Center Window, go to the Protected View tab and Disable all Protected View Checkboxes.

  • Click OK. Then, try to open the Excel file.

Method 4: Check and Provide the Excel File Permissions

Sometimes, you can get the error if you don’t have sufficient permissions to open the Excel file. This usually happens when you try to open the Excel file received from other sources. You can check and provide the desired permissions to fix the error. Here are the steps:

  • Locate the affected Excel file, right-click on it, and select Properties.

Right Click on Excel file and click on Properties

  • In the Properties window, click the Securities option and select Edit.

In Properties, Go to the Security Tab and click on Edit.

  • In the Security window, under ‘Group or users name’, select the user names. Check the file permissions and make sure Full Control is enabled. If not, then click on the Add option.

click add option under permissions

  • Click on the Advanced option in the Users, Computers, Service Accounts, or Groups window**.**

Under Users, Computers, Service Accounts, or Groups window, click on Advanced.

  • Click the Find Now option. A list of all users and groups appears in the search field.

In the Select Users, Computers, Service Accounts, or Groups window, click on Find Now.

  • Select “Everyone” from the list and then click OK.

Select Everyone from the Search Results and Click on OK.

  • In the object names field, you will see ‘Everyone’. Click on OK.

After the ‘Everyone’ username is entered in the object names field, click on OK.

  • In the Permissions window, select “Everyone” and enable all options (Full Control, Modify, Read & Execute, Read, and Write) under Permissions for Everyone.

Allow all Permissions for ‘Everyone’ by checking the boxes under Allow

  • Click Apply and then OK.

Method 4: Repair your Excel File

As the error message indicates, corruption is one of the causes of the “File format and extension of [filename] don’t match” error. If your file is corrupted, you can repair it using Microsoft’s built-in Open and Repair tool. Here are the steps to run the Open and Repair tool to repair corrupted Excel file:

  • In Excel, click on File.
  • Click Open and then click on Browse to select the corrupted Excel file.
  • In the Open dialog box, click the Excel workbook (in which you are facing the error).
  • Click the arrow next to the Open button and select Open and Repair.
  • Then, click Repair to recover as much data as possible.
  • The Excel prompts a message after the repair process is complete. Click Close.

The Open and Repair utility may fail to give the intended results. In such a case, you can repair the corrupted/damaged Excel file using a specialized Excel repair tool . Stellar Repair for Excel is one such tool that can repair severely corrupted Excel files. With the help of this tool, you can quickly recover all the objects from the Excel file. The tool has a simple user interface that even a non-technical can use to repair the Excel files. The tool can also repair multiple Excel files at once. You can check the tool’s functionality by downloading its demo version.

Closure

You can encounter the “File format and extension of [filename] don’t match” error due to different reasons. To resolve the issue, you can check the file extension, permissions, protected settings, etc. If you suspect the error has occurred due to corruption in the Excel file, you can try repairing the Excel file using the Open and Repair tool. If nothing works for you, then try Stellar Repair for Excel . It can repair highly damaged Excel files and recover all the data while preserving the file properties and cell formatting. The tool can help you fix all the common corruption-related errors quickly.


Also read:

  • Title: Solved - The File is Corrupted and Cannot be Opened - Excel 2021 | Stellar
  • Author: Ian
  • Created at : 2024-05-20 10:20:30
  • Updated at : 2024-05-21 10:20:30
  • Link: https://techidaily.com/solved-the-file-is-corrupted-and-cannot-be-opened-excel-2021-stellar-by-stellar-guide/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Solved - The File is Corrupted and Cannot be Opened - Excel 2021 | Stellar