Format time

  • Thread starter Thread starter td
  • Start date Start date
T

td

Is there a way to format cell for time so that I can enter
a number (like 700 for 7:00 am)?

Thanks
TD
 
Formatting the contents of a cell is totally separate from the part of Excel
that looks at what you type and interprets it as text, a number, a date, a
time, etc.

It doesn't matter how you've formatted the cell. Formatting as time doesn't
preclude you from entering something else, like text or just a number, etc.
Therefore, for Excel to correctly interpret what you type, you have enter
times in one of the formats that Excel will interpret as a time.

Typing 700 means, to Excel, the number seven hundred. It isn't a time. To be
able to type a time without a colon and have it entered in the cell as a time
requires VBA code to, e.g. take the number 700 that you typed and translate it
to 7/24 (7 24ths of a day), which is the number Excel uses to represent the
time 7 AM.
 
Back
Top