Account for weekends in a =IF formula

bfriday

New Member
Joined
May 16, 2017
Messages
8
Team,
Working on a spread sheet that is calculating the expected return date by number of pages and date turned in. Current formula:
=IF(I3<=0,"",IF(I3=5,"2"+B3,IF(I3<50,"3"+B3,IF(I3>=50,"14"+B3))))

Formula breakdown
IF(I3<=0 (Zero pages to keep the "FALSE" from appearing)
IF(I3=5 (5 pages turned in),"2"+B3(date pages turned in +2 days)
IF(I3<50(less than 50 pages turned in),"3"+B3 (date pages turned in +3 days)

How can I have excel account for the weekends to give an accurate return date of just working days?

v/r
B.Friday
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Check out the =WORKDAY() function and see if that works for you.

Also, I believe the "" around your numbers to add may be unnecessary.

=IF(I3<=0,"",IF(I3=5,"2"+B3,IF(I3<50,"3"+B3,IF(I3>=50,"14"+B3))))
 
Last edited:
Upvote 0
dreid1011,
I don't quit understand how to plug it into my current formula to account for it. Do you have an example?
 
Upvote 0
dreid1011,
I don't quit understand how to plug it into my current formula to account for it. Do you have an example?

Okay. Untested, but try this:

=IF(I3<=0,"",IF(I3=5,WORKDAY(B3,2),IF(I3<50,WORKDAY(B3,3),IF(I3>=50,WORKDAY(B3,14)))))

There is an optional argument for this function as well, if there are certain holidays you want to exclude from the calculation.
 
Upvote 0
Also, what should it be if I3 is 1-4? Your <50 condition will trigger on those values as well.
 
Upvote 0
Here is a much more concise version:

=IF(I3<=0,"",WORKDAY(B3,LOOKUP(I3,{5,6,50},{2,3,14})))
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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