Excell formatting

J

Jeffery

Hi all. I'm new to this, firgured someone here might be able to answer my
question. I have Office 2007. I'm trying to write a report for my science
class and have to enter the time in mililtary format. However when ever I
enter the time as 0645, it automatically changes it to 645. This is not
correct. I have tried just about everything I can find - but it won't stop
this auto converting... anyone know how to make it display what I type in and
not change it to how it wants it to read?
 
M

Mark Ivey

The only fix I have found for keeping a leading "0" is to change the cell
format to TEXT.


Select the affected cells, then CTRL + 1, then select TEXT as the number
type.
 
G

Gord Dibben

Jeffrey

Excel doesn't work that way.

If you need real times you must enter the time with colons 06:45 or use event
code which is available at Chip Pearson's site.

http://www.cpearson.com/excel/DateTimeEntry.htm

Alternative if you are not using the times for calculations just preface with an
apostrophe.

i.e. '0645 You won't see the apsostrophe in the cell.


Gord Dibben MS Excel MVP
 
E

Ed Ferrero

Hi Jeffery

In Excel 2007, to display times in military format -

Go to the Home Ribbon, click on the fromat drop-down in the Number group -
Click on 'More Number Formats', select the custom category -
Enter the following format code in th 'Type' box -
hh:mm

Now you can enter a time value in the cell that is displayed as military
time

e.g.
Enter Display
6:45 --> 06:45
5:40 pm --> 17:40

Ed Ferrero
 
Top