How to Restore Previous Version of Excel 2021 File? | Stellar

How to Restore Previous Version of Excel 2021 File? | Stellar

Nova Lv12

How to Repair Multiple Excel Files by Using Stellar

With Stellar Repair for Excel, it is quite easy and simple to repair multiple MS Excel (XLS and XLSX) files that are damaged. This is because the software has a self-explanatory interface and hence is a Do-it-yourself software. Nonetheless, when using this software to repair multiple Excel files, you would have to add all of the files into the software by following a few pre-defined steps. Follow the steps mentioned below:

Select file option

  • Click Browse and select corrupt Excel files. Select the checkbox to repair multiple files.

Search file

  • Click Repair
  • The software provides the preview facility. You can check the it on left pane.

Preview of file

  • Save the repired filr ether Default location or Select New Folder radio button.

select destination

Stellar Repair for Excel Stellar Repair for Excel is the best choice for repairing corrupt or damaged Excel (.XLS/.XLSX) files. This Excel recovery software restores everything from corrupt file to a new blank Excel file.

Learn More red arrow

Ways to Fix the “Failed to Parse the Corrupted Excel File” Error

Summary: While parsing an Excel file, you may experience the “Failed to parse the corrupted Excel file” error. It usually occurs if the Excel file is corrupt. This blog covers some easy fixes to fix this Excel error. It also mentions an advanced Excel repair tool that can help fix the issue by repairing the corrupted file.

Free Download for Windows

You may encounter the “Failed to parse the corrupted Excel file” error when parsing (extracting or converting) the data in an Excel file. This error usually occurs if the Excel file is corrupted – either completely or partially (some of its objects, like formulas, macros, and values are corrupt). However, there are various other reasons that may lead to this Excel error. Let’s know the possible causes behind the “Failed to parse the corrupted Excel file” error and how to fix it.

Causes of the “Failed to parse the corrupted Excel file” Error

This error could occur due to any of the following causes:

  • Damaged or corrupted macros
  • Excel document is closed suddenly
  • Issues with Excel application installation
  • Virus or malware attack
  • Hardware failure
  • Bad sectors on the hard drive

Ways to Fix the “Failed to parse the corrupted Excel file” Error

Here are some possible ways to fix this error and recover the Excel file.

Method 1: Try to Save the File in a Different Format

Sometimes, the error can occur if the file format is not compatible with your Excel version. You can try saving the file to a different format. To do this, follow the below steps:

  • Open the Excel file.
  • Click on the File option and then select Save As.
  • Click on Browse option and then click Save as Type.

Save As Window

  • Select the desired Excel file format and click Save.

Method 2: Revert to the Previously Saved Version of the Excel File

You can try reverting to the previously saved version of the Excel file. Here’s how:

  • Open your Excel application.
  • Navigate to File > Info > Manage Workbook.

Go To Manage Workbooks

  • Click Recover unsaved workbooks.

Click Recover Unsaved Workbooks

  • Click on the Restore option you see at the top of the file.

Method 3: Set the Calculation Option to Manual

When the calculation mode is set to automatic, Excel automatically recalculates all the formulas in the file even if you make a minor change. It can take time to load the file and stop you from parsing data in your Excel file. You can change the calculation option to manual so that Excel only recalculates when you explicitly tell the application to do it. Here are the steps:

  • Open your Excel application.
  • Navigate to File and then click Options.
  • In Excel Options, select Formulas.
  • Under Workbook Calculation, select Manual and click OK.

Select Manual On Excel Options

Method 4: Use Open and Repair Utility

You can try repairing the corrupted Excel file with Excel’s inbuilt tool – Open and Repair . To use the tool, follow the steps cited below:

  • In Excel, go to the File tab and then click Open.
  • Click Browse to select the corrupted file.
  • The Open dialog box will appear. Click on the corrupted file.
  • Click on the arrow next to the Open button and then click Open and Repair.
  • You will see a dialog box with three buttons Repair, Extract Data, and Cancel.

Click Repair Button

  • Click on the Repair button to recover as much of your work as possible.
  • After repair, a message will appear (as shown in the below figure).

Message After Repair

  • Click Close.

What If None of the Above Methods Works?

The above methods may fail to work if the Excel file is severely damaged. In such a case, we recommend using an efficient Excel repair tool , such as Stellar Repair for Excel. It can quickly repair corrupted Excel (.XLS/.XLSX) files. It can recover all the objects from the file, including charts, tables, formulas, etc. You can download the free trial version of the tool to preview the recoverable data.

Conclusion

Above, we have discussed some tried and tested methods to fix the “Failed to parse the corrupted Excel file” error. If the Excel file is severely damaged or corrupted, you can try repairing it using a third-party Excel repair software, like Stellar Repair for Excel . It can repair multiple Excel files without affecting the original formatting. The tool is compatible with all Excel versions.

Filter Not Working Error in Excel [Fix 2024]

Summary: The filter is not working issue in Excel can occur due to several reasons, like blank rows, hidden rows, merged cells, corrupted data, etc. In this post, we will mention the reasons why the filter is not working correctly in Excel and several fixes to resolve the issue. We will also mention an advanced Excel repair tool to repair the Excel file if corruption in file is the cause of the issue.

Free Download for Windows

You can use the Filter function in Excel to filter data in large-sized Excel files quickly. While using Excel filters, sometimes, you face a situation where the filter is disabled or may fail to function properly.

Filter Option Disabled

The Excel filter usually fails to work if you have not selected the complete and correct range of data. Let’s learn more about the “Sort and Filter not working in Excel” issue and look at the possible methods to fix it.

Why the Filter is not Working in Excel?

You can face the “filter is not working” issue if you are applying the filter on a protected worksheet or trying to find the data from a hidden row. Besides this, there could be many other reasons contributing to this issue, such as:

  • The data you are trying to filter is in merged cells.
  • The Excel file automatically selected the data up to the first empty cell, excluding the remaining rows.
  • Grouped sheets in Excel file.
  • Blank row in the Excel sheet.
  • You are trying to apply a filter on an invalid data range.
  • The workbooks in which you’re facing the filter issues are corrupted.
  • You are specifying incorrect criteria in the filter columns.

Solutions to Resolve the Filter is not Working Issue in Excel

There might be two scenarios: the Excel filter option is disabled/grayed out or the filters fail to function properly. You can follow the given troubleshooting solutions to resolve the issue based on the scenario you’re facing.

Scenario 1 – Filter Option is Disabled or Grayed Out

Method 1: Check and Un-group the Worksheet

When you apply filters to a single sheet in a grouped set, Excel disables the filter option in other sheets within the group. You can check the grouped sheets and try ungrouping them to enable the filter option. Here’s how to do so:

  • In the Excel file, go to the Group section.

Excel file navigation: Accessing the Group section

  • Right-click on the Ungroup Sheets.

Alternatively, you can press the Shift + Alt + Left keys to ungroup the sheets.

Method 2: Unprotect Worksheet

The “disabled Excel filter” issue can also occur if your worksheet is protected. You can unprotect the worksheet to enable the filter option. To do so, go to the Review tab and then select Unprotect Sheet.

Excel file: Navigating to Group section, resolving 'disabled Excel filter' issue with worksheet protection, unprotecting sheet from Review tab for filter activation.

Method 3: Check and Uninstall Excel Add-ins

Sometimes, the Excel filter gets disabled due to faulty or corrupted Excel add-ins. You can run the Excel in Safe mode to check whether the issue has occurred due to add-ins. To do this, type excel /safe in the Run window and click OK.

Troubleshooting disabled Excel filter caused by add-ins: Running Excel in Safe mode with 'excel /safe' in Run window

In safe mode, if you see the filter option, it indicates some problematic Excel add-ins were causing the issue. In such a case, you can check and uninstall the faulty Excel add-ins to fix the issue.

Scenario 2 – Filter is not Working

Method 1: Try Clearing Filters

Sometimes, the Excel filter fails to work correctly if some filters from the previous sessions are still active. In such a case, you can clear the applied filters. Follow the below steps:

  • In Excel file, click Sort & Filter option.
  • Select clear.

Excel: Clicking 'Sort & Filter' and selecting 'Clear' option.

Method 2: Select Entire Data

The filter not working issue in Excel can occur when the range selected for filtering is incomplete or incorrect. You need to make sure that you’ve selected the entire data range in Excel. You can use the Ctrl+A keys to select the entire content in the worksheet.

Method 3: Check and Delete Blank Cells from the Table’s Columns

When you apply a filter to the data, Excel expects data to be in a continuous range. Excel filters do not consider the blank cells, thereby resulting in incorrect functioning of the filter. To resolve this issue, check and delete all blank cells. In case your Excel file is too large to delete the blank cells, then you can add a “Serial number” row as an alternative. Adding serial number row creates a data continuity, thus helping in fixing the filter-related issue.

Method 4: Unhide Hidden Rows and Columns

Hidden rows or columns in worksheets can also affect the filter functionality. You can check and unhide rows/columns to troubleshoot the issue. Here is how to do so:

  • In the affected Excel file, go to Home.
  • Click on Format > Hide & Unhide.

Excel file: Navigating to Home, accessing Format > Hide & Unhide.

  • Click Unhide Rows or Unhide Columns (as required).

Selective unhiding in Excel: 'Unhide Rows' or 'Unhide Columns' as needed.

Method 5: Unmerge Cells

You can experience the filter in Excel is not working issue if you are using the filter to extract data from merged cells. Ensure to unmerge the “merged cells” before applying a filter in Excel. Follow the below steps to unmerge the merged cells in Excel:

  • Navigate to the Home option.
  • In the toolbar, select the Merge & Center option.
  • Click Unmerge Cells.

Method 6: Repair the Workbook

Sometimes, the Filter Not Working in Excel issue can occur due to inconsistencies in file structure. If these issues occurred due to corruption in the worksheet, you can repair it using the Open and Repair tool. It is an in-built tool in Excel that is used to repair corrupted Excel files. Here are the steps to use this tool:

  • In the Excel application, navigate to the File option.
  • Click Open and then click Browse to choose the Excel file.
  • In the Open dialog box, click the problematic Excel file.
  • Click the arrow next to the Open option and select Open and Repair.
  • Click Repair to recover as much data as possible.
  • The application prompts a message after the repair process is complete. Click Close.

In most cases, the Open and Repair tool can easily fix corruption issues in the Excel file. However, for any reason, if the open and repair tool doesn’t work you can consider repairing the file using a professional Excel Repair tool. Stellar Repair for Excel is one such advanced and secure tool to repair Excel files. With this tool’s powerful scanning capabilities, you can repair highly corrupted Excel files and recover all their objects with complete integrity. The tool is compatible with all Windows editions, including the latest Windows 11.

Closure

Several reasons are associated with the filter not working issue in Excel. The filter option may not work as expected if you have not selected the complete and correct range of data or for many other reasons. You can follow the troubleshooting methods discussed above to fix the issue. If the filter fails to work due to corruption in the workbook, then try Stellar Repair for Excel . It is an advanced tool that can even repair severely damaged files. It also helps to recover all the data from corrupted files without changing the original formatting. You can check the tool’s functionality by downloading its demo version. It allows you to preview all the repairable objects in the corrupted Excel file.

[Fixed] The Workbook Cannot Be Opened or Repaired By Microsoft Excel

An MS Excel workbook (.XLS/.XLSX) file may not open due to damage or corruption caused by various reasons, such as:

  • Sudden power failure
  • System crash
  • Virus or malware intrusion
  • Large or oversized Excel file
  • Incompatible add-ins
  • Drive errors
  • Damaged MS Office/Excel program files

As a result, when you try to open or access a corrupt Excel document, the program displays errors, such as “The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt.” This may lead to a data loss situation.

Methods to Fix ‘The Workbook Cannot Be Opened’ Error

When an Excel workbook gets corrupt, MS Excel automatically detects and starts the file recovery mode to open and repair the file. However, when it fails to repair the corruption or recover the Excel file automatically, it displays the error message, “The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt.” In such a situation, you can follow these methods to repair and recover the Excel document manually.

If the manual methods fail to resolve the error, you can use an Excel repair software, such as Stellar Repair for Excel. The software repairs corrupt XLS/XLSX file, recovers all the data, and saves it in a new Excel document with 100% precision, while keeping the cell formatting and properties intact.

NOTE: Before performing the below methods to repair or recover Excel documents, create a backup copy of the original file. This will help you recover data by using an Excel repair tool and avoid permanent data loss.  

1. Repair Excel Workbook Manually

If the automatic repair fails, you may try manual repair to fix the damage or extract the data from the damaged Excel workbook. The steps are as follows:

  • Navigate to File > Open and then go to the location where the spreadsheet is located.
  • In the Open window, select the corrupted workbook that you want to fix and then click on the arrow next to the Open button.
  • From the available options, choose Open and Repair

  • Then click ‘Repair‘ if you want to recover maximum data from the workbook or click ‘Extract data‘ if the repair option fails to fix the issue. It will extract all the values, formulas, tables, etc., from the corrupt workbook.

If both options fail to fix the issue, head to the next method.

2. Remove Faulty or Incompatible Add-ins

Faulty or incompatible add-ins may also cause this error. To find and remove such add-ins, follow these steps:

  • Press **Windows key + R.
    **

  • Type Excel /safe and press ‘Enter‘ or click ‘OK.’ This opens MS Excel in Safe Mode.
  • Go to File > Options and then select ‘Add-ins.

  • Choose ‘Excel Add-ins‘ from Manage: option and then click on the Go button to view all Add-ins.

  • Uncheck the checkboxes of Add-ins and then click ‘OK‘ to disable them.

Now close the Excel program and run it normally. Click ‘File > Open‘ and choose the Excel file you want to access.

3. Repair MS Office Installation

Damaged Excel program files may also lead to such errors. However, you can easily repair MS Office installation to fix the problem. The steps are as follows:

  • Open Control Panel and select ‘Uninstall a program.

  • Search and choose MS Office from the programs list. Then click on the ‘Change’ button.

  • Select ‘Repair’ and follow the wizard to fix the damaged program files.

If this fails to address the issue, you can uninstall and then fresh install MS Office on your system. Alternatively, try accessing the file on another PC.

4. Use Excel Repair Software

The best option is to use an Excel repair software, such as Stellar Repair for Excel , to repair the file, resolve the error, and access the Excel (XLS/XLSX) worksheet. The software can repair an Excel file without any size limitation.

After recovering the Excel file using the software, you can open it in any MS Excel program without encountering the error message.

Conclusion

A corrupt or damaged Excel workbook may lead to errors, such as “The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt,” and cause a data loss situation. The most efficient way to fix such corrupt Excel files is to repair them by using an Excel repair tool, such as Stellar Repair for Excel.

Unlike manual methods that may fail to resolve the issue or lead to further damage, this software extracts the data from the damaged Excel file and saves it in a new Excel workbook. Thus, it is 100% safe to run on an original Excel file, as it does not overwrite or alter the original file.

The software is free to download. You can scan, repair, and preview a corrupt Excel file by using the demo version. Once you are satisfied with the results, activate the software to save the repaired Excel workbook data in a new sheet.

How to Fix ‘Sharing Violation Error’ when Saving Excel?

Summary: You may encounter the sharing violation error in Excel when you repeatedly save changes in a workbook. The error can occur due to different reasons. In this blog, we will discuss the possible reasons behind this sharing violation error and some effective solutions to fix it. If the issue has occurred due to corruption in Excel file, you can try the advanced Excel repair tool mentioned in the post to repair the corrupted file.

Free Download for Windows

It is not uncommon to encounter errors while working with Excel application. One common error that Excel users face is the sharing violation error that occurs while saving an Excel spreadsheet. The complete error message says, “Your changes could not be saved to file because of a sharing violation.” When this error occurs, users won’t be able to save the changes in the file. So, it is important to fix this issue as soon as possible. But before fixing the error, let’s find out the causes behind this error.

Causes of Excel Sharing Violation Error

This error may pop up due to the below reasons:

  • The file you are trying to save is corrupted.
  • The Excel file is not in the trusted location.
  • Sharing Wizard is disabled.
  • You do not have permission to modify the Excel file.
  • The Excel file is not permitted to get indexed.

Methods to Fix the Sharing Violation Error in Excel

You can move the affected Excel file to a new folder and save it with a different name. Then, see if it fixes the error. If it doesn’t help, you can try the below methods.

Method 1: Check and Change the Excel File Properties

You can get the sharing violation error in Excel if the file attribute options, such as “File is ready for archiving” and “Allow this file to have contents indexed in addition to file properties” are disabled. You can check the File Properties and enable these options to fix the issue. Here are the steps:

  • Right-click on any Excel file and select Properties.

Click On Properties Option

  • In the Properties window, click on the Advanced option.

Click On Advanced Button On Properties Window

  • In the Advanced Attributes window, select the below options under File attributes:
  • File is ready for archiving.
  • Allow this file to have contents indexed in addition to file properties.

Select File Is Ready For Archiving Option

  • Click OK.

Note: If these options are already selected, then unselect and re-select them.

Method 2: Enable Sharing Wizard Option

The error “Your changes could not be saved to file because of a sharing violation” can also occur if the sharing wizard option is disabled on your system. You can check and enable the sharing wizard option using these steps:

  • Go to your system’s Documents folder.
  • Click View > Options > Change folders and search options.

Click View Option In Documents

  • In the Folder Options window, click View.

In Folder Options Click On View

  • Under the View section, search for the “Use Sharing Wizard” option in the Advanced Settings.

Select Use Sharing Wizard

  • If the Use Sharing Wizard option is unselected, select it and then click OK.

Method 3: Move the Excel File to a Trusted Location

You can encounter the sharing violation error if the file you are trying to save is not in the trusted location. You can try moving the file to a trusted location by following these steps:

  • In Excel, go to File and then click Options.
  • Click Trust Center and then click Trust Center Settings.

Click Trust Center Settings In Trust Center

  • In the Trust Center window, click Trusted Locations and then click Add new location.

Click On Add New Location Option

  • In the Add new location window, select Browse to locate and choose the folder, and then click OK.

Method 4: Open Excel in Safe Mode

Incompatible add-ins can create issues in the Excel file. To check if the sharing violation issue has occurred due to add-ins, open Excel in safe mode. To do so, follow these steps:

  • Open the Run window using Windows + R.

Type Safe Mode Command In Excel

  • Type excel /safe and click on OK.
  • Open the affected file and then try to save the changes.
  • If you are able to save the changes without any error, then it indicates add-ins are causing the issue. To fix this, you can remove the recently downloaded add-ins (if any).

Method 5: Repair the Excel File

Corruption in Excel file can also create issue while saving the changes. In such a case, you can repair the corrupted Excel file using the inbuilt utility in Excel, named Open and Repair. Follow these steps to use this utility:

  • In Excel, navigate to File > Open > Browse.
  • In the Open dialog box, click on the affected Excel file.
  • Click the arrow next to the Open button and select Open and Repair from the dropdown.
  • Click on the Repair option to recover as much data from the file as possible.

If the above utility fails to fix the corrupt Excel file, then you can use a more powerful Excel repair tool , such as Stellar Repair for Excel. This Excel repair tool can repair even severely corrupted or damaged Excel files (xls, .xlsx, .xltm, .xltx, and .xlsm). This tool can recover all the data from the corrupted Excel file, including images, chart sheets, formulas, etc., without changing the original format. It can help in fixing common corruption-related errors in Excel. You can download the software’s demo version to scan the corrupt file.

To Conclude

Above, we have discussed some effective methods to fix the sharing violation error in Excel. This error may also occur if you try to save the Excel file in an incompatible format. So, check the format and try saving the file in a compatible format. If the error occurs due to Excel file corruption, you can repair corrupt Excel file using the Open and Repair tool. If nothing works, then download a third-party Excel repair tool, such as Stellar Repair for Excel. It is an advanced tool that can fix severely corrupted Excel files. You can install this repair tool on any Windows system.

[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.

How to fix Pivot Table Field Name is not Valid error in Excel?

The Pivot Table field name is not valid error can occur while creating, modifying, or refreshing data fields in the pivot table. It can also appear when using VBA code to modify the pivot table. It usually occurs when there is an issue with the field name in a code or if there is a hidden or empty column in the pivot table. However, there could be many other reasons behind this error.

Why the “Pivot Table Field Name is not Valid” Error Occurs?

You can get the “Pivot Table field name not valid” error in Excel due to several reasons. Some possible causes are:

  • Excel file is corrupted
  • Damaged fields in the pivot table
  • Pivot table is corrupted/damaged
  • Hidden columns in the pivot table
  • Macro (referring to the pivot table) is corrupted
  • Preserve formatting option is enabled
  • Missing or incorrect fields in the VBA code
  • Issue with workbook.RefreshAll method syntax (if using)
  • Pivot Table contains empty columns
  • Header values or header column is missing in the Pivot Table
  • Pivot table is created without headers
  • Columns/rows are deleted from the Pivot Table

Methods to Fix Pivot Table Field Name is not Valid Error in Excel

You can get this error if you have selected the complete data sheet and then trying to create the Pivot Table. Make sure you choose only the data fields that you want to insert in the Pivot Table. If this is not the case, then follow the troubleshooting methods mentioned below.

Method 1: Check the Header Value in the Pivot Table

The “Pivot table field name is not valid” error can occur if you have not set up the pivot table correctly. All the columns having data in them should have header and header values. A pivot table without a header value can create issues. You can check the header and its value from the Formula bar. Change the header if the header value is too lengthy or if it contains special characters.

Adding reference for the document with details.

Method 2: Check and Change the Data Range in the Pivot Table

The “Pivot Table field name is not valid” can occur while modifying a field in Pivot Table. It usually occurs if you’re trying to add or modify the field by selecting an incorrect data range in the Create PivotTable dialog box. The “Create PivotTable“ feature helps define how data would be displayed within the pivot table.

Let’s take a scenario to understand this. Open the Excel file with PivotTable. Click on the fields (you want to add), go to the Insert option, and click PivotTable.

Inserting a Pivot Table from selection

If you select an incorrect range, i.e. A1:E18, instead of correct range - “Expenses**!$A$3:Expenses!$A$4**,” you will immediately get the error message.

Selecting a table range with values for report

So, type the correct range under the Select a table or range option and click OK.

Method 3: Unhide Excel Columns/Rows

The error can also occur if some columns/rows of the Pivot Table’s data source are hidden. When you try to add a hidden column as a field in the PivotTable, the Excel application will fail to read the data of the hidden column. You can check and unhide the Excel columns by following these steps:

  • Open the Excel file.

  • Locate the hidden column number.

  • Move your cursor on the hidden column number and right-click on the space between the columns. Click Unhide.

    unhiding the rows in Excel

Method 4: Check and Delete Empty Excel Columns

Sometimes, you can get the “Pivot Table field name is not valid” error if you are trying to use an empty column as a field in your Pivot Table. Check the columns with no values in all cells. If found, then delete the empty columns. This method is ideal for small-size Excel files. However, for large-sized files, it is a time-consuming process.

Method 5: Unmerge the Column Header (If Merged)

The “Pivot Table field name is not valid” error can also occur due to merged column headers. The pivot table references headers to identify the data inside the rows or columns. The merged headers can sometimes create data inconsistencies. You can try unmerging the column headers to fix the issue. Follow these steps:

  • In the Excel file, go to the Home

  • Click the Merge & Center option and select Unmerge Cells from the dropdown.

    unmerging cells from home tab in Excel

Method 6: Disable the Background Refresh Option

If the “background refresh” option in the Excel file is enabled, it may also create issues with Pivot Table. The Excel updates all the pivot tables in the background even after a small change if the background refresh option is enabled. This may create issues if the Excel file is large with too many tables. You can try turning off the “background refresh” option in the Excel file to troubleshoot the issue. Here is how to do so:

  • In the Excel file, go to the Data tab and then click Connections.

    Adding connections from the data

  • In the Workbook Connectionsdialog box, click on the ‘Add’ dropdown to add the workbook (in which you need to modify the refresh settings).

    Add the option for the Workbook connections.

  • Once you have chosen the Excel file, click Properties.

    Selecting Properties for the Workbook connections.

  • In the Connection Properties window, unselect the **”Enable background refresh”**option, select the “Refresh data when opening the file“, and click **OK.

    Enabling the connection properties by enabling and refreshing data

    **

Method 7: Check the VBA Code

The error can also occur when working with PivotTable using VBA code in Excel. Some Excel users reported this error on forums as run-time error 1004: The PivotTable field name is not valid. This error usually occurs when there are issues in the VBA code, affecting the PivotTable data source or field references. You can check field names referring to PivotTable or Workbook.RefreshAll function syntax and other errors in the code.

Method 8: Repair your Excel File

One of the reasons behind the “Pivot Table field name is not valid” error is corruption in the Excel file, containing the Pivot Table. You can repair your Excel file using Microsoft built-in utility - Open and Repair. Here’s how to use this utility:

  • In Excel, navigate to File > Open.

  • Click Browse to choose the affected workbook.

  • The Open dialog box will appear. Click on the corrupted file.

  • Click the arrow next to the Openbutton and then select Open and Repair.

  • You will see a dialog box with three buttons - Repair, Extract Data, and Cancel.

    Repairing the corrupt workbook from Excel

  • Click on the Repair button to recover as much of the data as possible.

  • After repair, a message is displayed. Click Close.

Method 9: Use a Professional Excel Repair Tool

If the Excel file is heavily damaged or corrupted, then the “Open and Repair” utility may not work or provide the intended results. In such a case, you can opt for a professional Excel repair tool. Stellar Repair for Excel is an advanced Excel file repair tool, which is highly recommended by experts. It can repair severely corrupted Excel files and restore all the data from corrupt file, including pivot tables. This tool comes with a user-friendly interface that even a non-technical user can use. You can try the software’s demo version to check how it works. The software is fully compatible with all Excel versions, including Excel 2019.

Conclusion

The Excel error “Pivot Table field name is not valid” can occur due to hidden or merged column/row headers, empty columns/rows, corrupted pivot table, and various other reasons. You can try the methods mentioned above to fix the error. If this error has occurred due to corruption in the Excel file, then you can use Stellar Repair for Excel - an advanced tool to repair corrupted pivot table, macros, fields, or other elements in an Excel file. It is compatible with all Windows editions, including the latest Windows 11. It can help fix the error if the data source or Pivot table configuration is affected by corruption.


  • Title: How to Restore Previous Version of Excel 2021 File? | Stellar
  • Author: Nova
  • Created at : 2024-03-13 18:31:41
  • Updated at : 2024-03-14 16:34:47
  • Link: https://blog-min.techidaily.com/how-to-restore-previous-version-of-excel-2021-file-stellar-by-stellar-guide/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
How to Restore Previous Version of Excel 2021 File? | Stellar