Four digit number /military time

linesite

New Member
Joined
Oct 10, 2009
Messages
41
I'm looking for a way to insert four numbers (e.g. 1830, 0830, 1215) into two cells (start /end time) without inserting a colon between the first two numbers and the second (e.g. 18:30, 08:30, 12:15) and ultimately compute the difference between the two times for the number of hours worked in a nearby cell.

Any help is greatly appreciated.

Keith
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I'm looking for a way to insert four numbers (e.g. 1830, 0830, 1215) into two cells (start /end time) without inserting a colon between the first two numbers and the second (e.g. 18:30, 08:30, 12:15) and ultimately compute the difference between the two times for the number of hours worked in a nearby cell.

Any help is greatly appreciated.

Keith

Assming that A2 <= B2 holds...

A2: '0830

B2: 12:15

C2:

=B2-TEXT(A2,"00\:00")
 
Upvote 0
Excel Workbook
GHI
5StartEndTotal
6183021003:10
7175523556:00
8120018006:00
Sheet1


and format as either [h]:mm or if its only for counting leave as decimals
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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