Slicers in Excel: Click-to-Filter Pivot Tables
By ExcelReady TeamUpdated 5 min read
The short answer
A slicer in Excel is a box of buttons that filters a pivot table or an Excel table when you click them. To add one, click inside the pivot, go to PivotTable Analyze > Insert Slicer, tick a field such as Region and click OK. Click a button to filter, and click Clear Filter to show everything again.
Key takeaways
- Insert a slicer from PivotTable Analyze > Insert Slicer, or from Table Design for an Excel table.
- Click one button to filter; turn on Multi-Select or hold Ctrl to pick several items.
- Report Connections lets one slicer filter several pivots built from the same data.
- A timeline is a slicer for dates that filters by year, quarter, month or day.
- Two slicers combine as AND, just like two criteria in SUMIFS.
On this page+
- What does a slicer do?
- How to insert a slicer for a pivot table
- How to filter with a slicer
- How to connect one slicer to several pivot tables
- How to add a timeline to filter by date
- How to use a slicer with an Excel table
- How to format slicers and change their settings
- Slicers, pivots and formulas
- Practise it
A slicer in Excel is a panel of buttons that filters a pivot table, or an Excel table, with one click. Each button is one item, such as East or West, and the highlighted buttons show exactly what the report includes. Slicers make a pivot easy for anyone to use, which is why they appear in so many dashboards. This guide shows how to add, use, connect and format them.
What does a slicer do?#
A slicer is a visible filter. A pivot's normal filter hides behind a small drop-down arrow, so readers can't see what's filtered. A slicer sits on the sheet as a box of buttons:
- Highlighted buttons are included in the report.
- Plain buttons are filtered out.
- Faded buttons have no data with the current filters.
The examples use this sales list in A1:D9, with a pivot showing Sales by Region:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Product | Units | Sales |
| 2 | East | Laptop | 3 | 3600 |
| 3 | West | Phone | 5 | 3000 |
| 4 | East | Phone | 4 | 2400 |
| 5 | South | Laptop | 2 | 2400 |
| 6 | West | Laptop | 1 | 1200 |
| 7 | East | Tablet | 6 | 1800 |
| 8 | North | Phone | 2 | 1200 |
| 9 | East | Laptop | 1 | 1200 |
Slicers for pivot tables arrived in Excel 2010 for Windows, and slicers for tables in Excel 2013. Current Microsoft 365 versions on Windows, Mac and the web all support them.
How to insert a slicer for a pivot table#
- Click any cell inside the pivot table.
- Go to PivotTable Analyze > Insert Slicer.
- Tick one or more fields, for example Region and Product.
- Click OK.
Excel adds one slicer box per field. Drag each box by its border to place it next to the pivot, and drag the corner handles to resize it.
You can slice by a field that isn't in the pivot layout at all. A pivot that shows only Sales by Region can still have a Product slicer.
How to filter with a slicer#
Click a button to show only that item. Click East in the Region slicer, and the pivot shows East's total of 9,000 (3,600 + 2,400 + 1,800 + 1,200).
To work with several items:
- Multi-Select. Click the checklist icon at the top of the slicer (Windows shortcut: Alt+S). Now each click adds or removes an item.
- Ctrl+click. On Windows, hold Ctrl and click to add single items. Click and drag to select a run of buttons next to each other.
- Clear Filter. Click the funnel icon with the red cross at the top right (Windows shortcut: Alt+C) to show all items again.
Two slicers combine with AND logic. Click East in Region and Laptop in Product, and the pivot shows only East laptops: 3,600 + 1,200 = 4,800. That is the same as a SUMIFS with two criteria, which you can try in the exercise on this page.
How to connect one slicer to several pivot tables#
One slicer can drive several pivots at once, which is the heart of a simple dashboard.
- Right-click the slicer and choose Report Connections (on the ribbon: Slicer > Report Connections).
- Tick every pivot table the slicer should filter.
- Click OK.
Now clicking East updates, say, a Sales by Product pivot and a Units by Month pivot together. The pivots must come from the same source data; pivots built from different ranges don't appear in the list. If you need a month breakdown for a dashboard, see how to group dates in a pivot table.
How to add a timeline to filter by date#
A timeline is a slicer made for dates. Instead of buttons, it has a bar you click or drag across.
- Click inside the pivot and go to PivotTable Analyze > Insert Timeline.
- Tick a date field and click OK.
- Use the drop-down in the top-right of the timeline to choose Years, Quarters, Months or Days.
- Click one period, or drag across several, such as January to March.
Timelines work with pivot tables in Excel 2013 and later, and the source field must contain real dates. A column with text dates won't show up in the Insert Timeline list.
How to use a slicer with an Excel table#
Slicers aren't only for pivots. Click inside an Excel table (press Ctrl+T, Mac: ⌘T, to make one), then go to Table Design > Insert Slicer. Clicking a button hides the table rows that don't match, just like the filter buttons.
A normal SUM still adds the hidden rows. To total only what the slicer shows, use SUBTOTAL, for example =SUBTOTAL(109,D2:D9), which ignores hidden rows. Put it above the table so it stays visible.
How to format slicers and change their settings#
Click a slicer to see the Slicer tab on the ribbon. The most useful settings:
- Slicer Styles change the colours. Pick one that matches your report.
- Columns (in the Buttons group) lays the buttons out side by side. Set it to 4 for a short horizontal bar of regions.
- Slicer Settings lets you rename the header, sort items, and tick Hide items with no data so empty buttons disappear.
- Lock position. In Size and Properties, choose Don't move or size with cells, so the slicer stays put when columns change width.
To remove a slicer, click its border and press Delete.
Slicers, pivots and formulas#
Slicers make pivots friendly, but sometimes you need the same numbers in fixed cells for a report. A formula like =SUMIFS(D2:D9,A2:A9,"East",B2:B9,"Laptop") returns 4,800 without any clicking. The comparison of pivot tables vs SUMIFS explains when each fits. Once the pivot is filtered, you can show each slice as a share with percent of total or add a ratio with a calculated field. Slicers and pivot dashboards are also a core part of the Excel skills data analysts need.
Practise it#
Filtering a pivot quickly, and knowing what the filtered total should be, is a common task in analyst tests. Practise pivot tables in a live spreadsheet: add filters, nest row fields and show percent of total, with instant checks. Then try the SUMIFS exercise on this page to confirm a two-slicer answer.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Slicers for Region = East and Product = Laptop would leave one total in the pivot. Get it with a formula: in G2, use SUMIFS to add D2:D9 where A2:A9 is East and B2:B9 is Laptop.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Sales | |||||||
| 2 | East laptops | |||||||
| 3 | ||||||||
| 4 | ||||||||
| 5 | ||||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | ||||||||
| 9 | ||||||||
| 10 | ||||||||
| 11 | ||||||||
| 12 |
Tip: SUMIFS starts with the column to add, then pairs of range and value: A2:A9 with "East", B2:B9 with "Laptop".
Practise this in a lesson
Frequently asked questions
What is a slicer in Excel?
A slicer is an on-sheet panel of buttons, one per item in a field, that filters a pivot table or Excel table. It also shows at a glance which items are currently filtered.
How do I insert a slicer in Excel?
Click inside a pivot table, go to PivotTable Analyze > Insert Slicer, tick the fields you want and click OK. For an Excel table, use Table Design > Insert Slicer.
How do I select multiple items in a slicer?
Click the Multi-Select button at the top of the slicer, or press Alt+S on Windows, then click each item. You can also hold Ctrl on Windows while clicking.
How do I connect one slicer to multiple pivot tables?
Right-click the slicer and choose Report Connections, then tick every pivot table it should filter. The pivots must be built from the same source data.
What is the difference between a slicer and a timeline?
A slicer filters by the items in any field, such as regions or products. A timeline only works with date fields and filters by a period you drag across, such as two months or a quarter.