Many times you may have faced a situation where you need to add a leading zero in Excel.

This tutorial will help you practice exactly that! Do y'all have a lot of numbers with an uneven number of digits in your Excel list?

Do you want to brand them uniform by adding leading zeros to them?

When adding zip codes, security numbers, or employee IDs in Excel, you may accept seen that Excel removes any leading zeros in the cell. For instance, if you lot type "007845" in Excel information technology will immediately turn it into "7845".

This is because Excel automatically treats these values as numbers and tosses the zeros out.

These are various ways to add a leading zero in Excel. Let's look at those options ane by i:

  • Change format to Text
  • Add an apostrophe (')
  • Use TEXT formula
  • Employ Custom Format

Watch this YouTube video to acquire adding leading zeros in Excel and don't forget to requite it a thumbs-up!

Add a Leading Zero in Excel | MyExcelOnline

Make certain to download the exercise workbook to follow forth and acquire how to add a leading aught in Excel.

Change format to Text

Since the reason why the zeros are tossed out is that Excel treats these values as numbers. The best option to add a leading zero in Excel would exist to just alter the format to the cell from "Number" to "Text".

To change the cell format to text, follow the steps beneath:

Stride 1: Select the cell in which you want to add prefix "0".

Add a Leading Zero in Excel | MyExcelOnline

Footstep 2: Go to Home Tab > Number Grouping.

Add a Leading Zero in Excel | MyExcelOnline

Step 3: From the dropdown select "Text".

Add a Leading Zero in Excel | MyExcelOnline

Now when y'all add the zeros in front of the number, the zeros will remain intact.

Add a Leading Zero in Excel | MyExcelOnline

You might notice a small-scale yellow triangle on that jail cell, information technology is simply indicated that you have stored a number to text.

Add a Leading Zero in Excel | MyExcelOnline

To remove that bulletin, click on the triangle, and from the list, select "Ignore Fault".

Add a Leading Zero in Excel | MyExcelOnline

As you tin can come across, this method adds zeros in front of the number by changing the cell format to Number.

Add an apostrophe (')

You tin but add an apostrophe (') in front of the number to make certain that the zeros are in identify. So, y'all can type '000001 instead of just 000001. In this style, the number volition be shown as you lot want information technology to without having to change the format.

Add a Leading Zero in Excel | MyExcelOnline

You can come across in the formula bar that an apostrophe is added as a prefix to the number.

Use TEXT formula

Even though the above options gets the work washed, it's a pain to add zeros in front of them one by one!

Follow the steps beneath to understand how to add together a leading nothing with one unmarried formula!

Step ane: Nosotros need to enter the TEXTpart in a blank jail cell:

=TEXT(

Add Leading Zeros in Excel

Step ii:  The TEXTarguments:

value

What is the value that you lot want to add a leading zero in Excel on?

=TEXT(B9,

Add Leading Zeros in Excel

format_text

How many leading zeros do you need?

If nosotros want our number to be 6 digits long, then type in 6 zeros: "000000"

=TEXT(B9, "000000")

Add Leading Zeros in Excel

Apply the same formula to the balance of the cells by dragging the lower right corner downwards. Your leading zeros are now ready!

Add Leading Zeros in Excel

Yous should keep in listen that all of these methods add together a leading nil in Excel by actually converting the cell format to text ane fashion or the other.

These methods will add the zeros in forepart of the numbers but the resulting value will be a text string, not a number.

Y'all will non be able to employ them to do whatever calculations with them or use them in numeric formulas.

This brings us to the last method to add together leading zeros in Excel – Using Custom Format

Use Custom Format

You can add leading zeros in Excel by using a custom format. This will only change the brandish and not the value of the prison cell i.e. the value in the prison cell will yet exist a number simply the brandish will comprise leading zeros.

Let's see how it can exist done!

Step one: Select the column in which you want to add leading zeros

Add a Leading Zero in Excel | MyExcelOnline

Stride 2: Press Ctrl +1 to open the Format Cells dialog box

Add a Leading Zero in Excel | MyExcelOnline

STEP 3: Select Custom and under blazon section: type 000000.Click OK.

Add a Leading Zero in Excel | MyExcelOnline

Leading zeros volition be added to all the numbers. If you select a cell containing these numbers and await at the formula bar, you volition run across that the underlying value in the formula bar remains unchanged.

Add a Leading Zero in Excel | MyExcelOnline

So, using this method you will display all 6 digits and the leading zeros volition automatically exist added to numbers containing less than 6 digits. Also, the value volition nonetheless be a number and will not be converted to a text string.

Decision

In this tutorial, you lot accept learned how to add leading zeros in Excel in more merely one way – changing number format to text, calculation an apostrophe, using a TEXT formula, and using Custom Format.

HELPFUL RESOURCE:

Brand sure to download our Gratuitous PDF on the 333 Excel keyboard Shortcuts here:

Add a Leading Zero in Excel | MyExcelOnline

You can learn more well-nigh how to utilize Excel by viewing our FREE Excel webinar preparation on Formulas, Pin Tables, and Macros & VBA!

You can follow our YouTube channel to learn more about How To Utilize Excel for Dummies!

How to Combine VLOOKUP and IFERROR to Replace the #N/A Error in Excel

👉 Click Here To Join Our Excel Academy Online Course & Access ane,000+ Excel Tutorials On Formulas, Macros, VBA, Pin Tables, Dashboards, Power BI, Ability Query, Power Pivot, Charts, Microsoft Office Suite + More than!