If today is friday, I need to AutoFilter by Mondays date

AlexH

New Member
Joined
Dec 11, 2012
Messages
17
If today is Friday, I need to be able to have an IF statement that will filter by Monday, but if not I need it to autofilter by tomorrows date. What I have now only does tomorrow, using "=IF(J2=TODAY()+1,TRUE,FALSE)", then it filters by true to show tomorrows schedule. What I'm looking for is a way for it to say if today is Friday, then run =IF(J3=TODAY()+3,TRUE,FALSE), but if it is Monday-Thrusday, run the other if statement. Any suggestions?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Excel has a Weekday function that returns a 1-7 number to indicate the day of the week.
So if today is a Friday =Weekday(Today(),2) will return 5. (The 2 in the formula says to use Monday as day 1 rather than Sunday)

With this function you should be able to get what you want, something like:
=Today()+If(Weekday(Today(),2)=5,3,1)
Note that this will treat Sat & Sun the same as Mon-Thu. If you want something different for Sat-Sun you'll need to include another IF.

I also don't get how J2 & J3 come into your application, so you'll need to adapt this as required.

HTH
 
Upvote 0

Forum statistics

Threads
1,215,621
Messages
6,125,884
Members
449,269
Latest member
GBCOACW

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