Compare date, if Sat, Sun or Mon, subtract 3

imastarr

New Member
Joined
Sep 19, 2014
Messages
4
I have a date in a spreadsheet in cell H3. If that date falls on a Saturday, Sunday or Monday, I would like excel to return a date in I3 that reflects three days earlier. So if H3 is a Monday, I need it to show Friday. If it is a Sunday, it needs to return a Thursday and if it is a Saturday, it needs to return a Wednesday. It can ignore Tuesday, Wednesday and Thursday and Fridays.

I hope I've explained this well enough! I am a novice when it comes to Excel and rely on these forums for assistance (which is always great!)

Thanks!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Welcome to the Board!

Try this:
Code:
=IF(OR(WEEKDAY(H3)=6,WEEKDAY(H3)=7,WEEKDAY(H3)=1),H3-3,H3)
 
Upvote 0
Thanks. I will give it a try myself using this next time or if I need to change something in this sheet. :)
 
Upvote 0
Welcome to the Board!

Try this:
Code:
=IF(OR(WEEKDAY(H3)=6,WEEKDAY(H3)=7,WEEKDAY(H3)=1),H3-3,H3)

I've tried this myself with little success, but, what if I needed to have have the remaining days report the day before and if a day falls on a Holiday, report the day before the holiday?
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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