Return value of "yes" if date is on the Monday to Friday of the previous week

junkforhr

Board Regular
Joined
Dec 16, 2009
Messages
115
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a column with various dates in it (column AK).

Scenario:

Today's date (Tuesday 13/09/2022) if date in AK2 is between Monday 05/09/2022 and Friday 09/09/2022, then return the value of "Yes", otherwise "No".

So next week the Monday's date would be 19/09/2022 and the previous Monday would be 12/09/2022 and Friday would be 16/09/2022. so the previous values of "yes" above would then be "No".

I hope I've been clear.

Cheers
Haydn
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Where to put the formula?
Not sure I can understand 100% but below is some guide:
Current Monday of current week:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),6,0,1,2,3,4,5)
Then: Last Monday of previous week:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),6,0,1,2,3,4,5)-7
and last Friday of previous week:
=TODAY()-CHOOSE(WEEKDAY(TODAY()),6,0,1,2,3,4,5)-3

Then formula should be:
Code:
=IF(AND(AK2>=TODAY()-CHOOSE(WEEKDAY(TODAY()),6,0,1,2,3,4,5)-7,AK2<=TODAY()-CHOOSE(WEEKDAY(TODAY()),6,0,1,2,3,4,5)-3),"Yes","No")
 
Upvote 0
This formula's no better than @bebo021999 provided in post #2, just a bit shorter.

Excel Formula:
=IF(AND(AK2>=TODAY()-3-WEEKDAY(TODAY(),15),AK2<=TODAY()+1-WEEKDAY(TODAY(),15)),"Yes","No")
 
Upvote 0
Another similar formula to kevin9999 and based on the solution from here:

Excel Formula:
=IF(AND(AK2>=TODAY()-WEEKDAY(TODAY())-5,AK2<=TODAY()-WEEKDAY(TODAY())-5+4),"Yes","No")
 
Upvote 0
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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