Time between two dates

Dr. J

New Member
Joined
Sep 27, 2006
Messages
2
I need to calculate the business hours between two date/time ranges. :unsure:

9/18/06 12:27 PM to 9/21/06 2:08 PM

The catch is, I only want to capture the hours/mins between 9am and 5pm, and ignore Saturday and Sunday.

Appreciate any help!

If there is another thread that discusses this issue, I would be grateful if you could point me in the right direction.

Thanks,
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Welcome to the board

If your start date/time is in A1 and end date/time in B1 and both these are within business hours

=(NETWORKDAYS(A1,B1)-1)/3+MOD(B1,1)-MOD(A1,1)

format result cell as [h]:mm

Note: NETWORKDAYS requires Analysis ToolPak to be installed
 

Dr. J

New Member
Joined
Sep 27, 2006
Messages
2
Thanks for the welcome and the advice barry houdini; I'll give it a try.
 

Forum statistics

Threads
1,136,878
Messages
5,678,312
Members
419,754
Latest member
LordEddard

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
Top