add leading zero's update formula

Can anyone assist in a basic query, I have column A of data, in numerical format, i.e. 887766, what has happened is the data provided has stripped leading 0's. Every value should have 8 numbers, so if it currently is 6 characters long, it needs 00 adding to the front of the sequence, if it is 5 characters long, it needs 000 addidng to the front of the sequence. If it is 8 characters long nothing needs to change. Any ideas?
Who is Participating?
Saqib Husain, SyedConnect With a Mentor EngineerCommented:
You can use a formula like

pma111Author Commented:
Thanks. Can you explain that formula to me? How it works?
Saqib Husain, SyedEngineerCommented:
It writes a text with the format specified in the double-quotes

=text(1234,"000000")   will return   001234
=text(1234,"000000.00")   will return   001234.00
=text(1234,"A00000")   will return   A01234

There are numerous options for the format which can be found in the help files.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.