How can I enter time digits without a separator?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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).
 
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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top