Avatar of smcelroy
smcelroy
Flag for United States of America asked on

populate excel with 0, after existing data

Hello, have a list of international dialing code rates and trying to get them to all be 9 digits in length. Below is an example and just looking to get the numbers in column A to go from "54" to "540000000" or "5411" to 541100000", so all values have 9 digits. We have an issue with our DMS250 table and better if all values are the same.

I have tried using Format Cells, select Custom and put nice "0"s, the that populates before

000000054      ARGENTINE REPUBLIC

Thanks,
Shawn

Column A and column B
54      ARGENTINE REPUBLIC
541      ARGENTINE REPUBLIC
549      ARGENTINE REPUBLIC
5411      ARGENTINE REPUBLIC
54114      ARGENTINE REPUBLIC
54221      ARGENTINE REPUBLIC
54223      ARGENTINE REPUBLIC
54230      ARGENTINE REPUBLIC
54232      ARGENTINE REPUBLIC
54261      ARGENTINE REPUBLIC
54291      ARGENTINE REPUBLIC
54299      ARGENTINE REPUBLIC
54341      ARGENTINE REPUBLIC
54342      ARGENTINE REPUBLIC
54348      ARGENTINE REPUBLIC
54351      ARGENTINE REPUBLIC
54353      ARGENTINE REPUBLIC
54358      ARGENTINE REPUBLIC
54381      ARGENTINE REPUBLIC
54387      ARGENTINE REPUBLIC
54911      ARGENTINE REPUBLIC
542652      ARGENTINE REPUBLIC
5422141      ARGENTINE REPUBLIC
5422142      ARGENTINE REPUBLIC
5422144      ARGENTINE REPUBLIC
5422146      ARGENTINE REPUBLIC
5422147      ARGENTINE REPUBLIC
5422148      ARGENTINE REPUBLIC
Microsoft Excel

Avatar of undefined
Last Comment
smcelroy

8/22/2022 - Mon
SOLUTION
StephenJR

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Saqib Husain

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jppinto

You can use a formula like this to add the zeros:

=A1&REPT("0",9-LEN(A1))

Please tale a look at the attached example.

jppinto
Add-Zeros-Right.xlsx
Saqib Husain

if the number and text are in the same cell then you might like to use

=SUBSTITUTE(A1,LEFT(A1,FIND(" ",A1)-1),LEFT(LEFT(A1,FIND(" ",A1)-1)&"000000000",9))
smcelroy

ASKER
Thanks everyone, decided to use the "=left(A1&"000000000",9)" as that seemed pretty straight forward.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
smcelroy

ASKER
but both the =A1&REPT("0",9-LEN(A1)) and =left(A1&"000000000",9) did work