Q:        I’ve set up a class roster/grade sheet in Excel and to insure confidentiality, I’ve given students an ID code. However, if the code starts with zeros (i.e. “00246”), Excel “looses” the zeros (i.e. “246”). Why?

 

A:         Good question. And you’re only one keystroke away from a solution.

 

            Excel only displays two types of data in a spreadsheet; numbers or text. Under most circumstances, Excel decides based on the first keystroke whether an entry is a number or text. When your first keystroke is a number (0 through 9), Excel assumes you are entering a number. If the entry begins with zeros, Excel will display the number, dropping what it assumes are needless leading zeros.

 

            However, if you make your first keystroke an apostrophe (‘), Excel treats whatever follows as text. (And when it displays the text, it does not display that leading apostrophe.)

 

Therefore, typing an apostrophe followed by zero-zero-two-four-six (‘00246) will cause “00246” to be displayed. (This also works pretty well with other “numbers” that are actually text, like 5-digit zip codes.)