If And Or—What To Use When

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
348
Office Version
  1. 2013
Platform
  1. Windows
I have a sheet showing order dates whereby the “Order Delivery Date” needs to show correctly per the following parameters.

If the day of the week shown in column “L” is Saturday, Sunday, or Monday then the date appearing in column “B” needs to be 5 days hence.

As you can see by the attached Xl2bb Mini Sheet, my formulas only have one condition, namely that L5 = “Saturday” but it gets even more confusing based on the “Day of the Week” number shown in column “I” because in rows 11 to 18 column “I” includes only numbers and as you can see the dates showing in column “B” get to be different than intended in 6 of the 7 instances.

Perhaps there are one or more columns not needed.

Any help will be much appreciated.

Cell Formulas
RangeFormula
B12:B18,B5:B8B5=IF(L5="Saturday",H5+5,K5)
C12:C18,C5:C8C5=TEXT(D5,"mmm/dd/yyyy ")&TEXT(E5,"hh:mm:ss")
D12:D18,D5:D8D5=H5
K12:K18,K5:K8K5=SUM($H5+$I5)
L12:L18,L5:L8L5=TEXT(K5,"dddd")
I5:I8I5=WEEKDAY(H5,2)
 
Pulling out my hair, bald by morning. I am trying to work thru this but getting confused.
I'll keep trying your last formula =IF(WEEKDAY(K5,12)>4,H5+5,K5) but just need to plug the right column designations in.

I got it. Your last formula does the trick.
Because I have sent different Xl2bb Mini Sheets with varying columns I had to figure out which columns you meant by columns H & K, thus the next Xl2bb shown here below will show how this gets resolved.
Thank you so much for bearing with me.
Bogus OrderPickDate.xlsx
BCDEFGHIJKLM
2Actual Delivery DatesOrder Delivery Date Per workday.intl formulaPick Order Date DateTimeActual Pick Order Date Day of the Week
3
4
5January 10, 2023January 10, 2023Jan/05/2023 10:22:00January 05, 202310:22:00January 05, 20234January 09, 2023Monday
6February 13, 2023February 13, 2023Feb/08/2023 14:23:00February 08, 202314:23:00February 08, 20233February 11, 2023Saturday
7March 08, 2023March 08, 2023Mar/03/2023 14:55:00March 03, 202314:55:00March 03, 20235March 08, 2023Wednesday
8April 10, 2023April 10, 2023Apr/05/2023 00:00:00April 05, 2023April 05, 20233April 08, 2023Saturday
Orders
Cell Formulas
RangeFormula
C5:C8C5=IF(WEEKDAY(L5,12)>4,I5+5,L5)
D5:D8D5=TEXT(E5,"mmm/dd/yyyy ")&TEXT(F5,"hh:mm:ss")
E5:E8E5=I5
L5:L8L5=SUM($I5+$J5)
M5:M8M5=TEXT(L5,"dddd")
J5:J8J5=WEEKDAY(I5,2)
 
Last edited:
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Pulling out my hair, bald by morning. I am trying to work thru this but getting confused.
I'll keep trying your last formula =IF(WEEKDAY(K5,12)>4,H5+5,K5) but just need to plug the right column designations in.
what is it you want to get with this formula? I thought you would be working well with the WORKDAY.INTL function posted earlier.
 
Upvote 0
See my last reply which I edited to include the resolution and the Xl2bb example.
 
Upvote 0
Okay, yeah. I go back and edit and folks reply before I can hit send as well.
But I still do not see the workday.intl function in your mini worksheet. (is it in column A?)

But, as you have a solution, that is great. Best wishes!
 
Upvote 0
Look at column C, and fill colored yellow. That is where the formulas exist,
 
Upvote 0
Look at column C, and fill colored yellow. That is where the formulas exist,
OK, you must be writing about @Fluff 's formula suggestion then. I didnt offer that solution. my last formula counted 3 workdays past the order date. I'm happy you were able to get a solution.

Best wishes!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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