Time calculation

Ks1102

Well-known Member
Joined
Jan 8, 2008
Messages
685
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.
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

joeu2004

Well-known Member
Joined
Mar 2, 2014
Messages
2,975
Office Version
  1. 2010
Platform
  1. Windows
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:

Watch MrExcel Video

Forum statistics

Threads
1,122,915
Messages
5,598,850
Members
414,263
Latest member
sherrcha

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