This UDF might do what you want.
Put this in a normal module.
and this in the ThisWorkbook code module.
CellEntry() returns the last text typed into the cell that calls the UDF CellEntry.
To demonstrate:
Enter =CellEntry() in a cell.
Select that cell, it will look empty and =cellentry() will be in the formula bar
Type "cat" and press Return.
The cell will show "cat", but the formula bar will show =cellentry().
Typing into the cell has set the return value of the CellEntry function to "cat".
It is one way to have a cell hold both a formula and a value entered by the user.
In your case, put
=TIMEVALUE(MID("000"&cellentry(),LEN(cellentry()),2)&":"&RIGHT(cellentry(),2))
in any cell.
Entering 1123 will set the value of CellEntry to "1123", and after being evaluated by the formula, the value in the cell will be the serial time 11:23 AM (0.53125).
Entering 930 puts 9:30 AM into the cell, which can be formatted to your taste.
Entering 1458 puts 2:58 PM in the cell.
Entering 035 returns 12:35 AM; 2435 - 12:35 AM tomorow
This can be done with as many cells as you like.
I hope this helps.
Bookmarks