steve.waye
Board Regular
- Joined
- Jul 8, 2010
- Messages
- 68
Hi all,
I've searched these forums for a solution to this problem but I'm thinking it might not be a simple answer.
I currently have a range of cells in a table that I want to display as time. I have used "Format Cells" and applied the custom format [h]:mm which is working fine.
This however requires the user to enter the time with a colon which slows down data entry.
For example, for 1 hour they need to enter "1:" for the correct result. If they simply enter a "1" the cell reverts to 24:00 (I assume it interprets it as 1 day).
I want users to be able to enter times in either regular time format OR in decimal format and have the result displayed in time format [h]:mm.
i.e. 2 hours 30 minutes can be entered as "2:30" or as "2.5" and the displayed result will be "2:30". Entering an integer should give a result in hours (entering "2" will give "2:00).
I assume this will require some VBA which I'm only a novice at.
Thanks in advance.
I've searched these forums for a solution to this problem but I'm thinking it might not be a simple answer.
I currently have a range of cells in a table that I want to display as time. I have used "Format Cells" and applied the custom format [h]:mm which is working fine.
This however requires the user to enter the time with a colon which slows down data entry.
For example, for 1 hour they need to enter "1:" for the correct result. If they simply enter a "1" the cell reverts to 24:00 (I assume it interprets it as 1 day).
I want users to be able to enter times in either regular time format OR in decimal format and have the result displayed in time format [h]:mm.
i.e. 2 hours 30 minutes can be entered as "2:30" or as "2.5" and the displayed result will be "2:30". Entering an integer should give a result in hours (entering "2" will give "2:00).
I assume this will require some VBA which I'm only a novice at.
Thanks in advance.