How can I enter time digits without a separator?

L

Lee

I have cells formatted to show time as 12:45 for example. I want to just
enter either 3 or 4 digits without the hour minute separator. Can this be
done?
 
G

Geoff

Lee said:
I have cells formatted to show time as 12:45 for example. I want to just
enter either 3 or 4 digits without the hour minute separator. Can this be
done?

Just do a custom format "hhmm".

Format: Cells -> Number tab -> Select "Custom" in the Category list box ->
type "hhmm" in the Type text box.
 
D

David Biddulph

Just do a custom format "hhmm".

Format: Cells -> Number tab -> Select "Custom" in the Category list
box ->
type "hhmm" in the Type text box.

Sorry, Geoff, but format controls how numbers are *displayed*, not how they
are *entered* which was what the OP asked. If you use your format and enter
1245, the display will be 0000, as Excel assumes that what you mean is
29/05/1903 00:00:00 (or 1245 days).
 
G

Geoff

Right you are! I just assumed that the dates would be entered in proper
decimal values. There I go assuming everyone thinks about dates as decimals
like me.
 
L

Lee

Bob Phillips said:
See http://www.cpearson.com/excel/DateTimeEntry.htm

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
Thanks for that Bob. I guess it will do what I want to do.... if only I
understood how to put it into my worksheet!
Ideally I would like it to automatically change the digits entered to the
correctly formatted time as soon as the user moves to the next cell.

Thanks,
Lee
 
G

Gord Dibben

Lee

Copy the second lot of code from Chip's site.

Right-click on your sheet tab and "View Code"

Paste the code into that module.

ALT + q to go back to your worksheet.

Start entering your digits.

As written, code works on A1:A10....adjust to suit.


Gord Dibben MS Excel MVP
 
Top