Avatar of Rex
Rex
Flag for United States of America asked on

Excel Function to Calc Elapsed Hours (Excluding Weekends)

I have a need to calculate the hours between two time and date columns (e.g. 2/24/2015  12:39:00 PM and 2/24/2015  2:31:00 PM)

Some cover time over multiple dates. I would like to exclude weekends from that elapsed time.

Can anyone help me with this? Thank you
Microsoft Excel

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Alexei Kuznetsov

=NETWORKDAYS(A1,A2)

You can also include local/federal holidays as a third parameter. Please find more on Excel Help: https://support.office.com/en-au/article/NETWORKDAYS-function-5fb5a1fa-c42d-4162-a762-7b1fc97215c5
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Rob Henson

The NETWORKDAYS function gives you the number of working days between two dates. You could then use the time parts of the two values to work out the additional hours.

Thanks
Rob H
Alexei Kuznetsov

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
SOLUTION
Rob Henson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Professor J

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Rob Henson

@ProfJimJam - your sample with two dates:

1 Jan 15 16:51
2 Jan 15 11:23

Your result 5:32

What does the 18/24 - 7/24 section do? I assume this gives working shift of 07:00 to 18:00. Where did you get that requirement? I asked the question but don't see an answer. Without that shift requirement, the result would be 18:32 ie 13 hours more being the spell between 18:00 on 1 Jan and 07:00 on 2 Jan.

Thanks
Rob H
barry houdini

Saurabh,

TIME(24,,) = 0

!

Rob's formula should work assuming you are counting all 24 hours in the day (except Saturday and Sunday) and as long as your start/end dates aren't on Saturday or Sunday. Will that be the case?

regards, barry
Saurabh Singh Teotia

Ahhh Barry my bad..didn't catch that on first place..Thanks for correcting..
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.