Get days, hours, and minutes between dates & exclude weekends (Help on Formula Logic)

VBA learner ITG

Active Member
Joined
Apr 18, 2017
Messages
267
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all,

I need your guidance on how to amend this formula to exclude weekends.

I have tried amending the formula but I am stumped on how to achive what I need.

=IFERROR(INT(C2-B2)&" days "&TEXT(C2-B2,"h"" hrs ""m"" mins """),"")

Link below to the website I used for the above formula:

Get days, hours, and minutes between dates
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
How about
=IFERROR(NETWORKDAYS.INTL(B2,C2)&" days "&TEXT(C2-B2,"h"" hrs ""m"" mins """),"")
 
Upvote 0
Hi Fluff,

Thank you for your time.

Before I posted this thread I tried with the formula you mentioned and I get a different desired result.

As you can see the original formula shows (0 days 1 hrs 12 min)

17/04/2020 06:43​
17/04/2020 07:56​
0 days 1 hrs 12 mins

With the revised formula the results appears as (1 days 1 hrs 12 min)

17/04/2020 06:43​
17/04/2020 07:56​
1 days 1 hrs 12 mins


This is where I am stumped when I try and amend the formula to exclude weekends.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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