Leading zeros aid predominantly to specify the length of a number. In the case of maintaining records such as any special identity number*,* zip code, security numbers, etc., you have to **keep leading zeros** on cells.

However, when you try to enter a zip code like ‘00901’ of Puerto Rico in a cell, Excel truncates it to ‘901′ right away.

It’s extremely important for Microsoft Excel to deal with leading zeros. For this, you have to convert the number to text. In this article, I am going to discuss the ways of converting numbers to text with leading zeros.

**Table of Contents**hide

## Download the Practice Workbook

## Excel Convert Number to Text with Leading Zeros

Let me introduce the dataset first. Actually, nine postcodes are given without leading zeros, and good to say that the postcode consists of five digits.

Now, we have to **add leading zeros** and we may proceed with the following effective ways.

### i. Using Text Format

It’s a simple solution

You can **add leading zero** without any problems if you change the cell format from number to text.

This means Excel does not treat your number as an actual number and does not remove zeros.

So how can I do that? Just follow the steps

**Steps**:

- Select a blank cell or cell range where you want to use the format
- Click on the
**Format Dropdown**selection in the**Numbers**command from the**Home**tab - Chose the
**Text**option from the lists

Now, the cells are ready to show leading zeros. After inputting the postcode manually, we will get the following output.

**Read More: ****How to Convert Numbers to Texts/Words in Excel**

### ii. Custom Format using Format Cells

**Custom Format **is a special type of format where you have numerous options to select in **Format Cells**. We will pick one from them.

**Steps:**

- Copy the ZIP codes to a new cell range and select the cell range
- Click on the
**Number**command - Choose the
**Custom**option from**Format Cells** - Type ‘00000’ as the zip code consists of five digits.
- Press
**Ok**

Thereafter, you will get the following

**Read More:** **[Solved]: Leading Zero Not Showing in Excel (9 Possible Solutions)**

### iii. Adding Apostrophe

Adding apostrophe is the easiest way to keep the leading zeros before any number. The main advantage is that the apostrophe isn’t visible in the cell though it is available in the formula bar and you can edit the cell.

In the following dataset, if you type **apostrophe (****‘****)** character before inputting the ZIP code and press **Enter **(that means you have to type **‘04330** in lieu of just **04330**), you’ll see the ZIP code with leading zeros.

**Read More:** **Add or Keep Leading Zeros in Excel (10 Suitable Ways)**

### iv. TEXT Function

The Excel **TEXT** function converts numbers into text in a workingsheet

The syntax of the function is

**=TEXT(value, format_text)**

The arguments of the function are the following:

**Value:** the value you want to convert to text

**Format_text:** the formatting to apply

**Steps:**

- Select the blank cell e.g. D5
- Type the formula like
where C5 is the value of a ZIP code and “00000” is the desired formatting as the ZIP code number consists of five digits.`=TEXT(C5, "00000")`

- Press
**Enter**

**Read More:** **How to Put 0 in Excel in Front of Numbers (5 Handy Methods)**

### v. RIGHT Function

RIGHT function returns all characters in a text string, depending on the number of characters you specify.

The syntax function is

**=RIGHT(text,[num_chars])**

The arguments of the function are the following:

**Text**: The text string containing the characters you want to extract.

**Num_chars**: Specifies the number of characters you want RIGHT to extract.

**Steps**:

- Select the blank cell e.g. D5
- Type the formula like
where C5 is the value of a ZIP Code, “00000” is the desired formatting and 5 is the number of characters`=RIGHT("00000"&C5,5)`

- Press
**Enter**

### vi. BASE Function

The BASE function converts a number into a text representation with the given radix (base).

The main syntax of the function is

**=BASE(Number, Radix [Min_length])**

The arguments of the function are the following:

**Number:** The number that you want to convert.

**Radix:** The base radix that you want to convert the number into.

**Min_length:** The minimum length of the returned string.

**Steps:**

- Select the blank cell e.g. D5
- Type the formula like
where C5 is the number of a ZIP code, 10 is the base, and 5 is the desired length of characters.`=BASE(C5,10,5)`

- Press
**Enter**

### vii. CONCATENATE function

This function joins a string of two or more texts. The syntax is

**
=CONCATENATE(text1, [text2], …)
**

The arguments of the function are the following:

**text1: **the first item to join

**text2: **the second item

**Steps:**

- Select the blank cell e.g. D5
- Type the formula like
where “00” is the first item & C5 is the second item, mainly the number of a ZIP code.`=CONCATENATE("00", C5)`

- Press
**Enter**

**Note:** Using CONCATENATE function you can **add leading zero** but you can not pad leading zeros.

**Read More:** **How to Concatenate Numbers with Leading Zeros in Excel (6 Methods)**

### viii. REPT and LEN function

A number of times, REPT can repeat a text.

The syntax of REPT function is

**=REPT(text, number_times)**

The arguments of the function are the following:

**Text:** The text you want to repeat.

**Number_times:** A positive number specifying the number of times to repeat text.

In addition, LEN returns the number of characters in a text string. The syntax is

**=LEN(text)**

**Text** Required. The text whose length you want to find.

The whole process can be done in the following steps.

**Steps:**

- Select a blank cell e.g. E5
- Type the formula like
where 0 is the item to repeat and 5 is the times to repeat`=REPT(0,5)`

- Press
**Ok**

- You see that all values are zeros. So that we have to merge the Column C and Column D. For this, select the cell E5 or a new blank cell in a new worksheet.
- Type the formula like
`=REPT(0,5)&C5`

- Press
**Ok**

- Again you see the outputs are not padded (added leading zeros) that means all the outputs are not 5 digit text with leading zeros. That’s why we need to use the LEN function. For this,select the previous cell E5 or a blank cell
- Type the formula like
where C5 is the number of ZIP codes.`=REPT(0,5-LEN(C5))&C5`

- Press
**Ok**

** **

**Read More: ****How to Add Leading Zeros to Make 10 Digits in Excel (10 Ways)**

### ix. Text.PadStart Function

Returns text of a specified length by padding the start of the given text.

The syntax of the function is

**=Text.PadStart(**

**text, count as number, character to pad)**

The arguments of the function are the following:

**Text: **the text you want to format (remember, it must in text format)

**Count as number: **The number of digits

**Character to pad: **The character you want to extract into the formatting

**Steps:**

- Select the cell range
**B4:B13** - Move into
**Data**tab - Choose the option
**From Table** - Check the selected table
- Press
**Ok**

Now we have to convert the ZIP code (number) into the text as the formula says.

- Pick the cursor to the upper left corner
- Select the
**Text**option for transforming the number into the text

At this moment, we have to use the function. Thus, we need to add a new column.

- Click on the
**Add Column**tab - Select
**Custom Column**command - Write the new name of the column-like
**Text with Leading Zeros (Padded)** - Type the formula like
where the column namely ZIP Code (Number) is input as text, 5 is the number of digits & 0 is the character to pad`=Text.PadStart([#" ZIP Code (Number)"],5,"0")`

- Press
**Ok**

- Click on the
**Close & Load**command - Pick the
**Close & Load To**option

- Choose the loading option as
**Table** - Select the cell C4 of
**Existing Working Sheet** - Press
**Load**

The final output you’ll get like the following:

### x. Power Pivot

Power Pivot is an Excel add-in for powerful analysis and sophisticated data models. You can use this option.

Power Pivot can mash large numbers of data from different sources, quickly analyze information and easily share insights.

The function used here is FORMAT. The syntax of the function is

**=FORMAT(value, format_text)**

The arguments of the function are the following:

**value:** The value you want to convert

**format_text:** The desired formatting you want to apply

**Steps:**

First, you have to enable the add-in **Power Pivot**. You can do this task by simply search **Power Pivot** in Excel and choose the option **Enable Add-In**. Please visit the link **Start the Power Pivot add-in for Excel – Excel (microsoft.com)** for a detailed guide.

- Select the cell range that you want to convert
- Click on
**Add to Data Model**command from the**Power Pivot**tab

- Select a blank cell and type the formula like =FORMAT([ZIP Code (Number)], “00000”) where ZIP Code (Number) is the text to convert and “00000” is the formatting to apply

- Select the
**PivotTable**option

- Pick
**Existing Worksheet** - Fix the
**Location** - Select the cell
**C4** - Press
**Ok**

- Select the
**Text with Leading Zeros (Padded)** - Move the
**Text with Leading Zeros (Padded)**into**Rows** - The output is at
**Row Labels**

- Click the cursor on the
**Design**tab - Select the
**Report Layout** - Choose the
**Show in Tabular Form**option

The final output of conversion of number to text is like the following-

## Things To Keep in Mind

Be sure that the data is in text format before using the Text.PadStart function.

Besides, check the requirement whether you have to find added leading zeros or padded leading zeros.

As added leading zeros are just the added prefix before zeros of a number on the other hand padded zeros are merged with the number forming a specified number of digits.

## Conclusion

Though all the ways discussed above are effective, it also depends on your requirements. So, choose the best one for you and your dataset. And please share your thoughts in the comments section below. Thanks for being with me.