I would like to avoid using the colon when entering a time. Can a cell be formatted to read the a military time like 1525 (not 15:25) and convert it to 3:25pm?
Thanks in advance
I would like to avoid using the colon when entering a time. Can a cell be formatted to read the a military time like 1525 (not 15:25) and convert it to 3:25pm?
Thanks in advance
Hello rtcol,
Excel doesn't provide a time format without a colon. If you wanted to enter the numbers in this way, you would need a macro. The macro would then examine the cells, make the conversion, and then set the cell's value to the am/pm format.
Here is an example that will convert any valid 24 hour entry (less the colon) in the range of D2 to D10 of the Worksheet you choose (see the installation instructions).
How to Save a Worksheet Event Macro![]()
Please Login or Register to view this content.
1. Copy the macro using CTRL+C keys.
2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
3. Left Click on View Code in the pop up menu.
4. Paste the macro code using CTRL+V
5. Save the macro in your Workbook using CTRL+S
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks