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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
You can use a formula like


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.