Easy Time Entry

E

egibberate

Hi,
Anyone know some code I could use to easily enter times into cells.
For example, I currently type '20:15' (without the quote's of course) but
would much rather type 2015 & have it appear as 20:15
 
G

Gord Dibben

See Chip Pearson's site for quick entry of dates and times.

Note: event code is required which Chip provides.

http://www.cpearson.com/excel/DateTimeEntry.htm

Elsewise you would need a helper column to change the numbers to times.

If you don't need to use the times for calculations you can use this custom
number format:

00":"00

Examples:

Typing 123 results in 01:23
Typing 1008 results in 10:08
Typing 3427 results in 34:27


Gord Dibben MS Excel MVP
 
D

David McRitchie

If you do that it will not be a time see Gord's answer referring to Chip's page.
 
E

egibberate

Thank you very much. The code for easy time entry works a treat. The code
for easy date entry will be useful too, but what does he mean by
"NOTE: Be sure that you do not have the "Fixed Decimal" edit setting turned
on. This will cause unexpected results"
Where is this switched on or off? Thank you for your time & advice.
 
G

gls858

egibberate said:
Thank you very much. The code for easy time entry works a treat. The code
for easy date entry will be useful too, but what does he mean by
"NOTE: Be sure that you do not have the "Fixed Decimal" edit setting turned
on. This will cause unexpected results"
Where is this switched on or off? Thank you for your time & advice.
Tools > Options > edit tab uncheck the box.

gls858
 
E

egibberate

I've just worked that part out!! Tools - Options - Edit Bla Bla Bla.
I'm in England & when I run the code I get really bizarre date results
September 1998 comes out as some time before the First World War.
Chip suggests we change this ourselves but as I'm only two weeks into this
VBA stuff , I'm still very challenged by it all.
In England we prefer to have the date 19/11/61 for the 19th of November
1961.
 

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

Top