Forum Discussion
Simple time input
- Jan 15, 2023
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.
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))
- WABlokJan 15, 2023Copper Contributor
that's what i want, but in the same cell.
Do I write it in cell A1 and hit enter the right outcome must be a time with : in it
- HansVogelaarJan 15, 2023MVP
The link that I posted in my previous reply provides the code that you need to convert 1045 to 10:45 in the cell itself.
- ReeseAndersonMar 01, 2023Copper ContributorHi Hans,
I am not great with Excel but am looking for this exact thing.
Would you be able to send me the code that allows the time conversion in the same cell?
I appreciate your time and any help you are able to provide.
Thank you!
- Jan 15, 2023
Hi WABlok
You can not enter the data and put the formula in same cell.
Once you finish enter the data in column A you can just copy the data from column B and paste it in column A