is it possible to just enter time and have the format in HH:MM?

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
801
Office Version
  1. 365
Platform
  1. Windows
I would like to just enter "1400" and have it format to "14:00" if possible.

I also have a VBA code that automatically re-formats cells to the correct formatting, would this be able to also successfully convert 1400 to 14:00 for instance?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Ok, lets say you enter 1400 into a cell.
The cell contains 1400, that's one thousand four hundred.

And let's say the FORMAT of the cell displays the value as 14:00

This does NOT change the value of the cell, the value of the cell is still 1400 (one thousand four hundred.).

Is that the value you want the cell to contain or do you want 1400 converted into 14:00 (perhaps to do other calculations with later)?

If the latter use a helper column with this formula

in B1
=TIME(--LEFT(A1,2),--RIGHT(A1,2),0)
 
Last edited:
Upvote 0
Err, I think either or would work. The reason being is that it gets transferred onto a timesheet which then gets printed, so as long as the end user sees "14:00" or whichever variable of this.
 
Upvote 0
Last edited:
Upvote 0
Something to bear in mind, if your timesheet is gonna print totals, add times up like in-times and out-times, like how many hours worked then you'll need to convert to proper times.

e.g.
1430 +0130 = 1560 but that's really 16:00, ie 1600


This page looks like it has several solutions

https://www.mrexcel.com/forum/excel-questions/1014107-accept-military-time-without-colon.html

Hey,

I said Timesheet but it's nothing as rigorous as that, it's just so an operator knows what time to pick up a client. There will be no addition or multiplication of time etc.

I just need it so that when they type in "1356" it plops a colon in the middle.
 
Upvote 0
That link I sent, one of the pages says use this Custom format

00\:00

Entering 1234 produces 12:34
 
Upvote 0
If I type in 1300 how can it automatically change to 1:00PM. This will be ten times easier then having people type the time on their own, or is their a way that the time can self populate once date is inserted into a cell?
 
Upvote 0
You either need a formula or VBA.
Some solutions here (I dont have time to read all this)

 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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