Time calculation

Ks1102

Well-known Member
Joined
Jan 8, 2008
Messages
689
Dear experts

may i have you help to have which formua can calcultion by number to time format!
for example

1110 - 916 = "hh:mm"


thanks very much.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
may i have you help to have which formua can calcultion by number to time format! for example
1110 - 916 = "hh:mm"

If you mean 1110 is the time 11:10 and 916 is the time 9:16, you cannot subtract the numbers 1110 - 916, then format as time.

Instead, you must format the numbers as time, then subtract as follows, if A1 is 1110 and B1 is 916:

=TEXT(A1,"00\:00") - TEXT(B1,"00\:00")

formatted as Custom hh:mm.

I assume that B1 is the start time and A1 is the end time. More generally:

=TEXT(A1,"00\:00") - TEXT(B1,"00\:00") + (A1<b1)
< B1)

That allows for an end time less than the start time because the time period spans midnight; that is, midnight is between the start and end times.
</b1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,517
Messages
6,119,984
Members
448,935
Latest member
ijat

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