Creating a 10-digit number and filling in the missing characters

acrawford

New Member
Joined
Sep 8, 2011
Messages
15
I'm working on spreadsheet that has an account number field that is supposed to be 10 characters. However, not all of the account numbers are the same length. Some longer and some shorter. I need the end of the account numbers that are missing digits to get filled in with 9's. Does anyone know of a simple way to do this without code? Thanks for any replies!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I came up with almost the same thing...
Assuming your accounts are in column A:

=A1&RIGHT("9999999999",10-LEN(A1))
 
Upvote 0
Excel Workbook
AB
112312312311231231231
212312311231231999
3121299999999
41231231231239999
Sheet17


Formula in B1 copied down.
 
Last edited:
Upvote 0
One more:

=LEFT(A1 & 9999999999, 10)
 
Upvote 0
All of these formulas work wonderfully and I can't thank each person enough for the prompt responses!

I have another issue I've ran into...is there a way to get the numbers inserted at the beginning of the account number instead of at the end?
 
Upvote 0
That's it!! I've tried and tried at this and I'm so aggrivated with myself for not getting this. Again, thanks for your help and time. Truly appreciate it!!!
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,882
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top