Friday, February 28, 2014

MS Excel: Get preceding Zero of fixed width text field

When you open csv file in MS Excel, for any text field as number with preceding Zero, excel treats them as number and remove the preceding Zero.

Let us say, that field is 5 characters long:


Excel will open it as (Assume in cell A1):


You can use the following formula to get back the Zero:


See the example below:

1 comment:

Anonymous said...

Very nice post.