In previous blogs I have mentioned that Excel has an idea of the type of data within a cell. If you type 0123 into a cell it should recognise that you have typed a number and deal with it as such.
How does it deal with it though? It will remove the leading zero and it should align it right (unless you have specified another alignment). Sometimes you do not want Excel to change what you have types, you want leading zeros to show, you want Excel to treat the number as text.
The quickest way is to add the character ‘ before the number. The single quote mark tells Excel that the cell is to be shown as is rather than changed.
This is particularly great for entering phone numbers, for example I might be entering a central London number of 020 7555 5555 I want to keep the leading 0 and the spaces. I would enter the number into Excel as ‘020 7555 5555 and excel will hide the ‘ but treat the cell as text and leave the number as you typed it.