Date and Time Calculation in Hours and Minutes

melmart

New Member
Joined
Aug 9, 2007
Messages
2
I am trying to calculate time elapsed between to date/times. I would like the elapsed time to be in hours. Below is an example:

Email Time: 2/25/2007 10:58 AM
Response Time: 2/27/2007 9:23 AM


Any suggestions?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
Hello melmart, welcome to the board.
Assuming your start time (Email time) is in B1 and your end time (response time) is in B2,
Format your formula cell as Custom [h]:mm and you can use this:
Code:
=(B2+(B2<B1)-B1)

This translates to:
Code:
=(End time+(End time<Start time)-Start time)

Hope it helps.
 
Upvote 0

Forum statistics

Threads
1,191,030
Messages
5,984,234
Members
439,879
Latest member
KingGoulash

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