Time format / formula

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
831
Office Version
  1. 365
Platform
  1. Windows
Im trying to create a worksheet for tracking time and am having a little trouble with how I enter the time..

Simply I enter the start time in C3 and the end time in D3 and E3 (formula in E3= =D3-C3-0.5/24) shows the elapsed time.
Is it possible to customize the way I enter the date like the following... If I want 6:00 AM to show up could I simply type 06 AM and or If it was 6:24 AM I simply type 0624 AM.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
06 implies it's AM, so AM is not needed. If you want to type AM then you dont need to type the 0 in front.

06 also implies you will enter 18 for PM.
 
Upvote 0
Looks like you need a helper column to convert the military time into proper time.
Or VBA.
 
Upvote 0
OK thanks. I didnt think about the helper column, Ill give that a try.
One more question, how can the formula be edited so when C3 & D3 are empty my E3 want show #########
This is the formula I have in E3 =D3-C3-0.5/24
 
Upvote 0
=IF(AND(E3="",D3=""),"#########",D3-C3-0.5/24)

If E3 and D3 are both blank, then display hashes else perform the calculation.
 
Upvote 0

Forum statistics

Threads
1,224,743
Messages
6,180,686
Members
452,994
Latest member
Janick

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