Select Slicer Based On Day

MrPatPat

New Member
Joined
Sep 27, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have 5 slices for 5 weekdays (Mon, Tue, Wed, Thur, Fri) and I would like a button to trigger a slicer based on the day of the week.

Open to any suggestions as well.

I have an employee list with 5 columns (Mon, Tue, Wed, Thur, Fri) that either have "yes" or "no" value and just need a button to show who's not in on the current day the spreadsheet is open.

I can add simple formulas like "=TEXT(TODAY(),"ddd")" to return the current day but just not sure how to connect to a macro to fire off a slicer relating to the current day.

The button in green below says "Who's Here Today?" but would just to Who's Not Here Today, as you can see, for Thursday it would show that one entry as it has "No".

Untitled.png
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Why not work around the issue?
Book1
ABCDEFGHIJKL
1Real variable7
2test variable2
3
4levelF NameL NameMONTUEWEDTHUFRIFire WardenFire Warden LevelHere Today?
5YesYesYesYesYesYes
6YesYesYesYesYesYes
7YesYesYesNoYesYes
8YesNoYesYesYesNo
9YesNoNoYesYesNo
Sheet1
Cell Formulas
RangeFormula
B1B1=WEEKDAY(TODAY(),2)
L5:L9L5=INDEX(Table1[@[MON]:[FRI]],$B$2)

Only 1 slicer needed on the extra column. (which can be hidden).
1635073089179.png
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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