We’ll use the following dataset to showcase possible errors with pivot table names and how to solve them.
Reason 1 – Missing Data in Any Cell of the Header Row
One of the cells of the header row in the dataset doesn’t have any data. You want to create a Pivot Table with this dataset.
We used the Insert tab and selected Pivot Table from the Tables ribbon.
In the PivotTable from table or range window, we inserted the cell range for the pivot table.
After clicking OK, an Microsoft Excel error message box will appear stating:
“The PivotTable field name is not valid. To create a PivotTable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a PivotTable field, you must type a new name for the field.”
- Press OK on this box.
- In our dataset, cell D4 is empty, and since it’s a header, Excel can’t make a pivot table with it.
- Insert a column header name in cell D4.
- If you click OK in the PivotTable from table or range window, the error won’t appear this time.
- You will see a Pivot Table in your selected location.
Reason 2 – A Deleted Header Column
If one or more of your column headers are deleted after creating the Pivot Table and you try to refresh it, the “The Pivot Table field name is not valid” error box will appear.
We have created a Pivot Table and one of the column headers was deleted.
If you refresh the Pivot Table (right-clicking and selecting Refresh) you will get the “The Pivot Table field name is not valid” error message.
Since we deleted a column header, the “The Pivot Table field name is not valid” error message box will appear.
- Insert a name for the missing column header.
- Refresh the Pivot Table. This time the error message won’t be shown.
Reason 3 – Selecting the Entire Sheet
If you try to create a Pivot Table by selecting the entire sheet, another Pivot Table error will happen.
During table creation, the Select a table or range box was empty. This is because we have selected the entire sheet.
A Microsoft Excel error box stating that “Data source reference is not valid” will appear.
- Select only the data cells of your worksheet, not the entire worksheet.
- If you open the PivotTable from table or range window, you will see that the Select a table or range box shows the reference to your data cells.
- Click OK. You’ll get a valid Pivot Table.
Reason 4 – Deleted Dataset
We have a Pivot Table in a worksheet and the dataset of the Pivot Table in another sheet. We are trying to refresh the pivot table by right-clicking on a cell of the Pivot Table.
All of a sudden, the “The Pivot Table field name is not valid” error box appears.
This can happen when the dataset of the Pivot Table or the sheet containing the dataset is deleted.
- Insert the dataset in the same location where it was before creating the Pivot Table.
- Refresh the Pivot Table and the “The Pivot Table field name is not valid” error message box won’t pop up anymore.
Reason 5 – Blank Columns in the Data for Pivot Table Field
We have a dataset with a blank column.
We have selected the cells and opened the PivotTable from table or range window.
If you click OK in this window, you will get “The Pivot Table field name is not valid” error message box due to an empty column.
- Select the blank column by clicking on the column number.
- Right-click on any of the cells of this column.
- A context menu will appear.
- Click on Delete.
- Select the dataset, open the PivotTable from table or range window, and click on OK.
- This time, the error box won’t appear and the Pivot Table will be created.
Reason 6 – Hidden Columns without a Header
We have the following dataset with hidden columns.
We opened the Pivot Table from table and range window and inserted the range containing the hidden columns.
We received an error, which means that one of the hidden columns is either empty or missing a column header.
- Right-click on the triple bar in the column number row. This triple bar indicates there are hidden cells.
- Click on Unhide from the menu.
- All the hidden columns will be unhidden.
- Add the missing column header or delete empty columns.
- We’ll create a Pivot Table with the modified dataset and won’t get an error this time.
Reason 7 – Merged Cells in the Data Range
If your dataset has any merged cells, you must unmerge the cells to create a Pivot Table.
We have the following dataset where column D and column E are merged.
If we try to create a Pivot Table with this dataset, the “The Pivot Table field name is not valid” error box will appear.
- Select the merged cells and go to Home, then select Merge and Center and choose Unmerge Cells.
- This will unmerge the cells.
- Check for empty columns and remove them.
- There are no empty columns in your dataset and every column has a column header.
- This time, you will be able to create a Pivot Table from this dataset.
Download the Practice Workbook
<< Go Back to Pivot Table in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!