Conditional formatting excluding weekends

dmhotep

New Member
Joined
Jun 17, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Well, my search has come to an end, I have found many "skip weekends" and count the next day (Monday if it is Friday), but what I am looking to do is highlight the next workday (Monday through Friday), but come Thursday, highlight both Friday AND Monday.

This works well to highlight the next workday, but how do I extend it to the following Monday as well?
Code:
=IF(TODAY()+1=WORKDAY(D1,0,2),TODAY()+1,"")
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try =OR(AND(WEEKDAY(D1,2)<6,D1=TODAY()+1),AND(WEEKDAY(D1,2)=1,D1=TODAY()+4))
 
Upvote 0
Thank you Toadstool! I was getting closer to a solution until frustration set in. I replaced today() with a date in a cell and ran it through, it works very well. Now I will study the solution and have an AhHa moment...
 
Upvote 0
Glad I could help. Here's a short explanation.

Wrapped in an OR() because you want a TRUE to trigger the Conditional format if either:

WEEKDAY type 2 (Monday=1, Sunday=7) is less than 6 AND date is day after today
OR
WEEKDAY is Monday AND date is 4 days ago.
 
Upvote 0
I changed it to =OR(AND(WEEKDAY(D1,2)<7,D1=$I$11+1),AND(WEEKDAY(D1,2)=1,D1=$I$11+3)) which highlights Saturday and Monday if it's Friday! Very cool. I started down the AND(OR path at one point instead of the IF( I started with. This makes sense to me now. Thank you again.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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