You can add a manual filter to an Excel pivot table column by clicking the filter arrow in the column header and using the "Filter by Value" menu to select specific items. This allows you to restrict the data shown in the pivot table to only those items you want to view, hiding the rest without changing the underlying data source.
What You'll Need
- A computer with Microsoft Excel installed. The steps below are for Windows versions of Excel, such as Excel 2016, 2019, 2021, and Microsoft 365.
- A dataset with data organized in rows and columns, ideally with headers in the first row.
- A pivot table created from that dataset.
Step-by-Step
- Locate the Pivot Table Column Header. Look at the top of your pivot table. Find the column that contains the category or item you want to filter. The column header will be the label for that column (e.g., "Region", "Product Category", or "Salesperson"). In Excel, the column headers in a pivot table are usually the only place where you can apply a filter directly to the column itself.
- Click the Filter Arrow. Click the small arrow icon that appears on the right side of the column header. This arrow is part of the pivot table's built-in filtering mechanism. A dropdown menu will appear, showing you all the unique items in that column based on your current data source.
- Access the "Filter by Value" Menu. In the dropdown menu, look for the option labeled "Filter by Value..." or sometimes just "Value Filter...". This option is usually found near the top of the menu, often below or near the "Sort A-Z" and "Sort Z-A" options. Clicking this option opens a specific dialog box for filtering by specific values.
- Choose the Filter Criteria. In the "Filter by Value" dialog box, you will see a field labeled "Value". This is where you enter the specific item or criterion you want to filter by. For example, if you want to filter for "East", you would type "East" in this field. You can also use the comparison operators that might appear, such as "Equals", "Does Not Equal", "Greater Than", etc., depending on the type of data in that column. If you are filtering by text, the comparison operators might be less prominent or limited to "Equals" and "Does Not Equal".
- Apply the Filter. Once you have entered your value or criteria, click the "OK" button at the bottom of the dialog box. Excel will immediately apply the filter to the pivot table. The pivot table will now only display the rows or data elements that match your specified value.
- Verify the Results. Look at your pivot table to confirm that the unwanted items have been hidden and that only the data you wanted to see is now displayed. The filter arrow in the column header will often change its appearance (e.g., turn blue) to indicate that a filter has been applied.
Common Mistakes
- Filtering the Source Data Instead of the Pivot Table. A common error is to try to apply a filter to the original dataset in the main worksheet. While you can do this, it will not automatically update the pivot table to reflect those changes. The pivot table maintains its own separate view of the data. Always apply filters directly to the pivot table column headers for the most direct and reliable control.
- Forgetting to Use "Filter by Value". Simply checking items in the dropdown list (e.g., "East" and "West") will create a filter that shows both items. To show only one specific item, you must use the "Filter by Value..." option and ensure the criteria is set to include that single item.
- Not Updating the Pivot Table. If you make changes to your underlying data source after creating a pivot table, you must refresh the pivot table to see those changes. You can do this by right-clicking anywhere inside the pivot table and selecting "Refresh". This is crucial because a manual filter is applied to the current state of the pivot table data.
- Copying and Pasting Filtered Results. After applying a filter, you cannot simply copy the visible rows from the pivot table and paste them into another location. The paste will include the hidden rows as well. To copy only the visible, filtered data, you must first select the data, then use the "Copy Visible Cells Only" option. You can access this by going to the Home tab, clicking the arrow next to the "Copy" button, and selecting "Copy Visible Cells Only".
Tips
- Use the "Value Filter" for Precise Control. The "Filter by Value" dialog box is the most powerful way to filter a pivot table column. It allows you to filter for a single item, exclude specific items, or use more complex criteria. For example, you could filter for items that are greater than a certain value, or items that are not equal to a specific text string.
- Apply Multiple Filters. You can apply multiple filters to a single pivot table column. For instance, you could filter for "East" and also exclude items that are from the "North" region. This gives you fine-grained control over the data you want to see.
- Use the Search Bar in the Dropdown Menu. The dropdown menu for a pivot table column header includes a search bar. This is useful when dealing with large numbers of items. You can type a few letters of the item you are looking for, and the list will narrow down to show only those items that match your search. This makes it much faster to find and select the items you want to filter by.
- Clear Filters with One Click. If you want to remove all filters from a single column, simply click the filter arrow in its header and select "Clear Filter from [Column Name]". This will instantly restore the full view of that column's data in the pivot table.
- Filter Multiple Columns Together. You can apply filters to multiple columns at the same time. Excel will treat these filters as an "AND" condition, meaning it will only show data that meets the criteria for all the filtered columns. This is a powerful way to drill down into your data and find exactly what you are looking for.
Troubleshooting
- The "Filter by Value" option is missing. If you click the filter arrow and the "Filter by Value..." option is not present, it may be due to the version of Excel or the specific data type. In some older versions or with certain data types, the option might be named differently or located in a different part of the menu. However, the standard location is near the top of the dropdown list. If you cannot find it, try using the search bar in the dropdown menu to look for "Filter".
- The filter is not working correctly. If you apply a filter but the data does not change as expected, check that you are clicking the filter arrow in the pivot table column header and not in the source data. Also, ensure that you have refreshed your pivot table after making any changes to your source data, as a manual filter is applied to the current data cache.
- Filter arrows are not visible. If you do not see the filter arrows on your pivot table columns, it means the pivot table is currently set to show all data without any filters. You can enable the filter arrows globally by going to the "PivotTable Analyze" tab on the ribbon (or the "Options" tab in older versions), clicking the dropdown arrow for the "Filter" button, and ensuring the "Display Filters" option is checked.
- Refreshing the pivot table removes my manual filter. This is a known behavior in Excel. When you refresh a pivot table, it resets the data cache, and any manual filters that were applied to the column headers will be cleared. To prevent this, you can save your workbook before refreshing, or you can apply the filter again after refreshing. There is no built-in setting to preserve manual filters during a refresh.
Frequently Asked Questions
Can I filter a pivot table column for values that are greater than or less than a specific number?
Yes, you can. When you use the "Filter by Value..." option, you can often select from comparison operators like "Greater Than" or "Less Than" in the dropdown menu, depending on the data type in that column. For example, if the column contains sales figures, you can set a filter to show only sales greater than $1,000.
Why does my filter disappear after I save and reopen the file?
Filters on a pivot table are not automatically saved with the file in the way that a cell value is. When you open a file, the pivot table is reset to its original state. You will need to reapply your filters each time you open the file.
How do I apply the same filter to multiple pivot tables?
You cannot simply copy and paste a filter from one pivot table to another. Each pivot table has its own independent filter state. However, you can use the "Refresh All" option in the "Data" tab to ensure that all pivot tables are using the most up-to-date data from the source.
Is it possible to filter a pivot table column for multiple specific items at once?
Yes. To filter for multiple items, you can check the boxes next to each item you want to include in the dropdown menu. Excel will then show only the data that includes any of the checked items. To use the "Filter by Value..." dialog box for multiple items, you would typically need to apply multiple filters or use the "OR" logic within the dialog, which can be complex. The checkbox method is the most straightforward way to select multiple items.
What happens to the hidden rows in the pivot table?
Hidden rows in a pivot table are simply not displayed in the pivot table view. They are not deleted or moved. They remain part of the pivot table's internal data structure. If you were to copy the pivot table and paste it into another location, the hidden rows would be copied as well unless you use the "Copy Visible Cells Only" option.
Can I sort a filtered pivot table column?
Yes, you can sort a filtered pivot table column. The sort options will only affect the visible items that match your current filter. For example, if you have filtered for "East" and sorted the column in ascending order, the sorted list will only contain the "East" items.