Quick Links

One way to display figures in an Excel table according to certain time periods is by using filter buttons. However, a better way to do this is to use a timeline, a dynamic filter option that allows you to quickly display data from individual days, months, quarters, or years.

Step 1: Turn Your Data Into a PivotTable

The first step is to turn your raw Excel data into a PivotTable. To do this, select any cell in your formatted or unformatted table of data, and click “PivotTable” on the Insert tab on the ribbon.

A cell is selected in an unformatted range of Excel data, and the PivotTable button in the Insert tab is higlighted.

Related

How to Create a PivotTable in Microsoft Excel

Don’t be intimidated by PivotTables. We’ll teach you the basics to build your own in minutes.

Then, in the dialog box, check that the whole range of data is selected, including the headings, and choose either “New Worksheet” or “Existing Worksheet,” depending on where you want your data and timeline to be. I prefer to create PivotTables on new worksheets, so that I have a blank canvas to play around with its tools and features. Once you’ve made your selection, click “OK.”

The PivotTable From Table Or Range dialog box in Excel, with a range selected, New Worksheet checked, and the OK button highlighted.

Now, in the PivotTable Fields pane, check the fields that you want your PivotTable to display. In my case, I want to see both the month and sales totals, so I’ll check both fields.

Excel's PivotTable Fields pane, with the Month and Sales fields on display, and their respective checkboxes highlighted.

Since Excel recognizes that my data contains months and values, it automatically places the Months field in the Rows box and the Sum Of Sales field in the Values box.

Excel's PivotTable Fields pane, with Month in the Rows box, and Sum Of Sales in the Values box.

Notice, also, that Excel has added years and quarters to the PivotTable’s Rows box in the screenshot above. This means that my PivotTable has been condensed into the largest time unit (in this case, years), and I can click the “+” and “-” symbols to expand and contract the PivotTable to display and hide the quarterly and monthly figures.

A PivotTable in Excel, with 2023 divided into quarters and months.

However, since I want my PivotTable to always display the monthly data in full, I’ll click the down arrow next to each of the other fields in the PivotTable Fields pane, and click “Remove Field,” leaving only the original Month field in the Rows box. Removing these fields helps the timeline to work more effectively, and I can re-add them directly through my timeline when it’s ready to go.

The right-click menu of a field in the Rows box of Excel's PivotTable Fields pane is expanded, and Remove Field is selected.

Now, my PivotTable displays each month and the respective sales totals.

A PivotTable in Excel showing months in the left-hand column and sales in the right-hand column.

Step 2: Insert Your Timeline Filter

The next step is to add a timeline that is linked to this data. With any cell in the PivotTable selected, open the “Insert” tab on the ribbon, and click “Timeline.”

A cell in a PivotTable in Excel is selected, and the Timeline button in the Insert tab is highlighted.

In the dialog box that appears, check “Month” (or whichever time period you have in your table), and click “OK.”

The Month field in Excel's Insert Timelines dialog box is checked, and the OK button is selected.

Now, reposition and resize the timeline on your spreadsheet so that it sits tidily near your PivotTable. In my case, I’ve inserted some extra rows above my table, and moved the timeline to the top of my worksheet.

A timeline filter in Excel is placed above a PivotTable.

Hide your Excel spreadsheet’s gridlines to make your graphics stand out and further improve the worksheet’s appearance.

You can now use the timeline to display selected data in your PivotTable. For example, if I click “JUL” under the 2024 label, only the data from July 2024 will show in the table.

JUL in an Excel timeline is selected, and the relevant data for that month is displayed in the PivotTable.

To display more than one month at a time, click and drag the handles on the left and right edges of the colored bar in the timeline. Alternatively, click one month, hold Shift, and click another month to display those two months and all months in between. Your PivotTable will also show a grand total row to make data analysis even easier.

APR to JUL are selected in an Excel timeline, with the PivotTable beneath displaying the data for these months.

Another way to use the timeline is to select different time units, like quarters or years. Even though you removed these in the PivotTable Fields pane earlier, they still appear as filters in your timeline.

Simply click the down arrow in the top-right corner of your timeline box, and, for example, click “Quarters.” In my case, I want my table to display the data for each month from the first three quarters of 2023, so I’ve selected these on my timeline.

The Quarters unit is selected in Excel's timeline, and the first three quarters of 2023 are selected.

Select the timeline and press Alt+C to clear the selected dates and display all the data again. Alternatively, click the filter icon with a red cross, which is in the top-right corner of the timeline box.

Step 3: Format Your Timeline Filter

As well as resizing and repositioning your timeline, you can also format it so it looks the part. When you select your timeline, Excel adds the Timeline tab to the ribbon. There, you can choose which labels to show by checking and unchecking the options in the Show group, or select a different design in the Timeline Styles group.

The Timeline Styles and Show groups in Excel's Timeline tab on the ribbon.

Although there’s no way to reformat the preset timeline styles, you can create a copy of a style and reformat that instead. To do this, right-click your chosen style, and click “Duplicate.”

An Excel timeline style is selected via a right-click, and the Duplicate option is highlighted.

Then, in the Modify Timeline Style dialog box, rename your new style in the “Name” field, and click “Format.”

The Modify Timeline Style dialog box in Excel, with the Name field filled out and the Format button selected.

Now, run through the “Font,” “Border,” and “Fill” tabs to apply your own design to your timeline, and click “OK” twice when you’re done to close both dialog boxes and save your new style.

The Format Timeline Element dialog box in Excel, with the tabs highlighted and the OK button selected.

Finally, with your timeline selected, click the new timeline style you just created to apply its formatting.

To further adjust the design of your new timeline style, right-click the style in the Timeline Styles group of the Timeline tab, and click “Modify.”

Go One Step Further: Add a PivotChart

The final step to making the most of your timeline is to add a PivotChart, which will update according to the dates you select in your timeline. Select any cell in your PivotTable, and in the Insert tab on the ribbon, click “PivotChart.”

The PivotChart button in the Insert tab of Excel's ribbon is selected.

Now, in the Insert Chart dialog box, select a chart type in the left-hand menu and a chart in the right-hand selector area. In my case, I’ve selected a simple clustered column chart. Then, click “OK.”

Related

The 10 Most Common Excel Charts and What They’re Used For

Choose the best way to visualize your data.

A clustered column chart is selected in Excel.

Reposition and resize your chart, double-click the chart title to give it a new name, and click the “+” button to choose which labels to display.

Related

How to Format Your Chart in Excel

Excel offers (too) many tools for making your graphs look the part.

An Excel sheet containing a PivotTable, timeline, and PivotChart, with the PivotChart's plus icon selected.

Now, select a time period on your timeline, and see both the PivotTable and PivotChart display the relevant data.


Another way to quickly filter data in an Excel table is to add an Excel data slicer, a series of buttons representing different categories or values within your data. The added benefit of using slicers is that they don’t require you to convert your data into a PivotTable—they work just as effectively with regular Excel tables.