Using IFS to calculate a task due by date but needing to remove weekends

StephMJ

New Member
Joined
Apr 16, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,

I am trying to calculate a DUE BY date/time based on PRIORITY of task completion from TIME OF REQUEST, and am using the following formula:

=IFS(OR(ISBLANK(A4),ISBLANK(B4)),"",B4=Data!$N$10,A4+4/24,B4=Data!$N$11,A4+1,B4=Data!$N$12,A4+5)

A4 = Time of request
B4 = Priority (i.e. task to be completed within 4 hours, 24 hours or 5 working days from time of request - these options are presented in a drop down menu)


Time of request
Priority
DUE BY
17/04 12:31Very Urgent (<4 hrs)17/04 16:31
17/04 13:30Urgent (24 hrs)18/04 13:30
19/04 14:005 Business Days24/04 14:00

This formula seems to work pretty well, however, I need to remove weekends from the calculation (otherwise the DUE BY includes days where no one is working). I've tried playing around with WORKDAY and NETWORKDAYS but can't make it work (if anything, it stuffs up the formula altogether or leads to an error statement). This self-trained excel novice is at a loss, so any advice on how I can make this work would be greatly appreciated :) Thank you!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I'm not sure where your error is. But, I changed the formula a bit, and am using the SWITCH function:
(You should prob also use the WORKDAY function for the 2nd scenario as well, ... what happens if column A is a Friday?

Book1
ABCLMN
1
2
3Time of requestPriorityDUE BY
42024-04-17 12:31Very Urgent (<4 hrs)2024-04-17 16:312024-04-17 16:31Very Urgent (<4 hrs)
52024-04-17 13:30Urgent (24 hrs)2024-04-18 13:302024-04-18 13:30Urgent (24 hrs)
62024-04-19 14:005 Business Days2024-04-24 14:002024-04-26 14:005 Business Days
Sheet1
Cell Formulas
RangeFormula
L4:L6L4=IF(OR(ISBLANK(A4),ISBLANK(B4)),"",SWITCH(B4,$N$4,A4+4/24,$N$5,A4+1, (A4-INT(A4)) + WORKDAY.INTL(A4,5,1)))
 
Upvote 0
I'm not sure where your error is. But, I changed the formula a bit, and am using the SWITCH function:
(You should prob also use the WORKDAY function for the 2nd scenario as well, ... what happens if column A is a Friday?

Book1
ABCLMN
1
2
3Time of requestPriorityDUE BY
42024-04-17 12:31Very Urgent (<4 hrs)2024-04-17 16:312024-04-17 16:31Very Urgent (<4 hrs)
52024-04-17 13:30Urgent (24 hrs)2024-04-18 13:302024-04-18 13:30Urgent (24 hrs)
62024-04-19 14:005 Business Days2024-04-24 14:002024-04-26 14:005 Business Days
Sheet1
Cell Formulas
RangeFormula
L4:L6L4=IF(OR(ISBLANK(A4),ISBLANK(B4)),"",SWITCH(B4,$N$4,A4+4/24,$N$5,A4+1, (A4-INT(A4)) + WORKDAY.INTL(A4,5,1)))
Amazing! Thank you so much - I appreciate you taking the time to provide this. It works a treat! I have much to learn about excel...
 
Upvote 0
You're welcome. And welcome to the forum
Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,157
Members
452,615
Latest member
bogeys2birdies

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