Slicer for age groups

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have a table like the one below. I inserted a table then I inserted Slicer for age. So I can use the slicer to filter. My question, can I group age into group like this

18-30
31-50
51-65

So the slicer can show only 3 groups only. I know that can be done in Pivot table but can it be done here with a regular table not pivot? Thank you very much

namesexagedept
mary1f39hr
linda1f26it
kim1f19sales
allen1m38it
adam1m49marketing
mary2f50sales
linda2f61marketing
kim2f26hr
allen2m26it
adam2m27sales
mary3f59it

<colgroup><col span="3"><col></colgroup><tbody>
</tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You'll need to turn it into a table if you haven't already (click in the data and press ctrl + T).

Then add a column =IF([@age]<31,"18-30",IF([@age]<51,"31-50","51-65"))

You can then slice that
 
Last edited:
Upvote 0

Forum statistics

Threads
1,212,938
Messages
6,110,788
Members
448,297
Latest member
carmadgar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top