Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Saturday, August 15, 2009

Create a Column in Excel with Leading 0s

To create a column in Excel with leading 0s given a column A with values 0,1,..., and 12 character string to create, use this formula on the target column:


= RIGHT("000000000000" & A1,12)

The result will be 000000000000,000000000001,...
Then just use the copy, paste special as values technique mentioned earlier.

Reference: http://www.koozie.org/2004/11/excel_leading_z.html

No comments: