Skip to main content

How To Add or Pad Leading Zeros To Numbers or text In Excel?

If you have a list of numbers that you need to add or pad some leading zeros before the numbers, when typing the zeros manually, they will be removed by default. This article is going to show you some tutorials about how to add leading zeros to numbers or text in ranges of cells in Excel.

doc add leading zeros 1

Method 1: Add or pad the leading zeros to numbers to equal certain length with Text function

Method 2: Add or pad the leading zeros to numbers to equal certain length with Format Cells function

Method 3: Add or insert the same number of leading zeros to numbers with Concatenate function

Method 4: Add or insert the same number of leading zeros to numbers and text with Kutools for Excel


Method 1: Add or pad the leading zeros to numbers to equal certain length with Text function

Supposing you have a range of data, and you need to add zeros in front of each cells to make the numbers as same length. How could you quickly add the zeros before the numbers?

The Text function will add zeros in front of numbers, and make the new numbers with leading zeros in certain length.

Enter the formula =TEXT(A4,"000000") in a blank cell where you want to output the result, and then drag the fill handle down to the cells that you want to apply this formula, and all the numbers become a fixed six-digit character string, see screenshot:

doc add leading zeros 2

Note: This Text function can not add leading zeros for text.


Method 2: Add or pad the leading zeros to numbers to equal certain length with Format Cells function

In Excel, the Format Cells feature also can help you pad the leading zeros to cell values to make them as same length, please do as this:

1. Select the cell values you want to pad leading zeros, and then right click, then choose Format Cells from the context menu.

2. In the Format Cells dialog box, under the Number tab, select Custom in the left Category pane, and then enter 000000 into the Type text box, (In this example, I will make the numbers as six-digit numbers, you can change it to your need.), see screenshot:

doc add leading zeros 3

3. Then, click OK to close this dialog box, and the numbers in the original cells have been converted to the certain length numbers with leading zeros. See screenshot:

doc add leading zeros 4


Method 3: Add or insert the same number of leading zeros to numbers with Concatenate function

If you want to insert specific digit of leading zeros into each number, for example three leading zeros for each number, you should try the Concatenate function.

Enter the formula =CONCATENATE("000",A4) in a blank cell, and then drag the fill handle down to fill this formula to other cells, and all numbers have been added three zeros before the numbers, see screenshot:

doc add leading zeros 5


Method 4: Method 4: Add or insert the same number of leading zeros to numbers and text with Kutools for Excel

Functions or formulas may be not easy for you to remember and apply. Here is another tricky way, the Add Text utility of Kutools for Excel, to help you insert leading zeros before numbers in selections.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. 

1. Select the range that you want to add zeros before the numbers or text.

2. Then click Kutools > Text > Add Text, see screenshot:

3. In the Add Text dialog box, enter the number of zeros with a leading apostrophe in the Text box, and select the Before first character option, then click Ok button, and the zeros have been added before the numbers as following screenshot shown:

doc add leading zeros 7

Click to Download Kutools for Excel and free trial Now!

The Add Text utility of Kutools for Excel supports us to add any specific text and characters before or after the original cell text. What's more, we can add specific text between original cell texts. No matter which settings you set, you can preview the cell changes in the Preview section. Click to know more about this utility.


Add leading zeros to numbers or text with Kutools for Excel

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Download the free trial now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (76)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Благодарю за материал 🙏
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hola me pueden ayudar tengo una lista de datos cada dato contiene letras y números pero requiero ampliar su longitud a 12 con los ceros en la parte de enmedio conocen una formula que me ayude. Ejemplo: dato = DID45 expectativa = DID000000045
This comment was minimized by the moderator on the site
Hi Chelas,

Are there always three letters before two number characters?
If so, you can use the Add Text feature, and choose Specify option. And enter 3 in the input box to add 7 zeros after the 3rd character.https://www.extendoffice.com/images/stories/comments/ljy-picture/add-seven-zeros.png

Amanda
This comment was minimized by the moderator on the site
I got my already programmed and blank ATM card to withdraw the maximum of $100,000 MONTHLY for a maximum of 12 MONTHS. I am so happy about this because i got mine last week and I have used it to get $400,000 already. () is giving out the card just to help the poor and needy though it is illegal but it is something nice and he is not like other scam pretending to have the blank ATM cards. And no one gets caught when using the card. Get yours from THOMAS PERRY Hackerz today! Just send an email to ()
This comment was minimized by the moderator on the site
В примере ошибка, нужно ставить не запятую, а точку с запятой: "= Текст (A2, "00000")"
This comment was minimized by the moderator on the site
thank you, very helpful
This comment was minimized by the moderator on the site
I was wondering how i would write phone numbers in excel, but there was no zeros appearing. And also the phone numbers are in one column like

column D
This comment was minimized by the moderator on the site
Thank you for sharing..it's really use for me.
This comment was minimized by the moderator on the site
Thank you for helping me out. You saved my day!
This comment was minimized by the moderator on the site
Worked well for me. Thanks alot.
This comment was minimized by the moderator on the site
Hey, i was wondering how to put text in-front of a number with 0 decimal places. ie. it comes up as " Sp3.145255246345 " and i want it to show " Sp3" Thanks
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations