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.
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
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!- HansVogelaarMar 01, 2023MVP
See the attached workbook. Right-click the sheet tab and select 'View Code' to see the code.
You can change the range it applies to in the line
If Application.Intersect(Target, Range("B2:C27")) Is Nothing Then
- WABlokJan 15, 2023Copper ContributorLooking at your name, guess a Dutchy, me also?
You need to help me with that VBA thinghy- HansVogelaarJan 15, 2023MVP
Yes, I'm Dutch.
Can you tell me in which cells you want to be able to enter time without : ?
Or: Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me. Thanks in advance.
- WABlokJan 15, 2023Copper ContributorSend you a PM and file
- PeterBartholomew1Jan 15, 2023Silver Contributor
Sorry, I should have followed up your reference. I wonder who maintains Chip's site these days? There is a lot of good material that is still relevant.
- HansVogelaarJan 15, 2023MVP
Since Chip's untimely death, the site is kept online by Greg Truby and Bill Jelen, as far as I know. It is preserved "as is".