Forum Discussion
Simple time input
Hello everyone,
I'm looking for an easier way to enter times in excel.
for example, if I enter 1000 it should be processed automatically to 10:00.
So I want to skip the step that I have to enter the : myself, saves me so many actions to go from my numpad to the shift + ;.
Who can help me on how to get this done, thanks in advance.
See the attached version. It is now a macro-enabled workbook; you'll have to allow macros when you open it.
If you want to inspect the code, right-click the sheet tab and select 'Code weergeven' from the context menu.
15 Replies
- PeterBartholomew1Silver Contributor
You would need a VBA event handler for that. Excel, being a functional programming environment, is specifically designed to disallow such changes of state resulting from formulae.
- Jihad Al-JaradySteel Contributor
Hi WABlok
Just to make sure I understand you well, you need to convert the number to time like
1000 --> 10:00
1250 --> 12:50
130 --> 01:30
once you enter your numbers in column A write this formula in column B
=CONCAT(IF(LEN(TRIM(A1))>3,LEFT(A1,2),CONCAT(0,LEFT(A1,1))),":",RIGHT(A1,2))