Excel Formula to Subtract Time with Conditions

tmohler

New Member
Joined
Jul 13, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

Hopefully some can help provide some guidance and/or solution.

I am trying to create a formula to subtract the receipt date/time from arrival date/time. Have a condition with in the formula to subtract non operating time on Friday, Saturday, and Sunday. Conditions would be based off any cell difference greater than 24 hours. Example is attached.

Main formula

=IF(E2<1,E2,IF(A2="Friday",AND(E2>0.98,E2-0.31,IF(A2="Saturday",AND(E2>0.81,E2-0.48,IF(A2="Sunday",AND(E2>0.81,E2-1.15,C3)))))))

1689271969145.png


Thank you for your help and support

Theo
 

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).
Sorry for the extra reply below is what was used in the formula to subtract the time
Friday
7/12/2023 23:30​
Saturday
7/13/2023 7:00​
0.31​
7:30​
Saturday
7/12/2023 19:30​
Sunday
7/13/2023 7:00​
0.48​
11:30​
Sunday
7/12/2023 19:30​
Sunday
7/13/2023 23:00​
1.15​
3:30​
 
Upvote 0
Hello Everyone,

Just following up to see if anyone has a possible solution.

Thanks,
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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