7/16/2025

how to create a year slicer in google sheets

IN SUMMARY

Creating a year slicer in Google Sheets allows you to filter data by year, providing a convenient way to analyze and visualize your data. This can be achieved by adding a slicer based on a column containing year values.

Prepare Your Data

It's recommended to create a copy of your original data set to avoid modifying the original data. This can be done by creating a new sheet and using the QUERY function to copy the data from the original sheet.

If your data set doesn't have a dedicated year column, you can create one by using the YEAR function on the date column. For example, if your date column is in column A, you can add a new column with the formula =YEAR(A1) and copy it down for all rows.

Ensure that the year column is formatted as a number or text, depending on your preference. This will ensure that the slicer recognizes the values correctly.

Create the Slicer

Create a pivot table based on your data set. This can be done by selecting your data range and going to Data > Pivot table.

With the pivot table selected, go to Data > Slicer and choose the year column from your data set. This will add a slicer to your sheet, which you can move and resize as needed.

Right-click on the slicer and choose 'Customize slicer' to adjust its appearance, such as font size, color, and layout. You can also rename the slicer to make it more descriptive.

Use the Year Slicer

Click on the year slicer to select or deselect the years you want to include in your analysis. The pivot table and any associated charts or visualizations will update automatically to reflect the filtered data.

You can create additional slicers based on other columns in your data set, such as month, category, or region. This allows you to filter your data based on multiple criteria simultaneously.

If you update your data set with new rows or modify the year values, you may need to refresh the slicer to ensure it reflects the latest data. Right-click on the slicer and choose 'Refresh' to update it.

Want to automate your busy work in Google Sheets with AI?

Videos