Simon Sez IT

Online software training and video tutorials for Microsoft, Adobe & more

  • Course List
    • Adobe
      • Dreamweaver
        • Dreamweaver CC
        • Dreamweaver CS6
        • Dreamweaver CS5
        • Dreamweaver CS4
      • Flash
        • Flash CS5
      • InDesign
        • InDesign CS6
        • InDesign CS5
      • Photoshop
        • Photoshop CS6
        • Photoshop CS5
        • Adobe Photoshop CS4
      • Photoshop Elements
        • Photoshop Elements 2022
        • Photoshop Elements 2019
        • Photoshop Elements 2018
        • Photoshop Elements 15
        • Photoshop Elements 14
        • Photoshop Elements 13
        • Photoshop Elements 12
        • Photoshop Elements 11
        • Photoshop Elements 10
        • Photoshop Elements 9
        • Photoshop Elements 8
    • Microsoft
      • Access
        • Access 2021 Beginners
        • Access 2019
        • Access 2019 Advanced
        • Access 2016
        • Access 2016 Advanced
        • Access 2013
        • Access 2013 Advanced
        • Access 2010
        • Access 2010 Advanced
        • Access 2007
      • Excel
        • Data Analytics in Excel
        • Excel 2021 Advanced
        • Excel 2021 Intermediate
        • Excel 2021 Beginners
        • PivotTables for Beginners
        • Excel Dashboards
        • Advanced Formulas in Excel
        • Excel for Business Analysts
        • Advanced PivotTables
        • Power Pivot, Power Query and DAX in Excel
        • Excel 2019 Beginners (Mac)
        • Excel 2019 Beginners
        • Excel 2019 Advanced
        • Excel 2016 Beginners
        • Excel 2016 Intermediate
        • Excel 2016 Advanced
        • Excel 2013
        • Excel 2013 Advanced
        • Excel 2010 Beginners
        • Excel 2010 Advanced
        • Excel 2007
      • OneNote
        • OneNote Desktop and Windows 10
        • OneNote 2016
      • Outlook
        • Outlook 2021
        • Outlook 2019
        • Outlook 2016
        • Outlook 2013
        • Outlook 2010
        • Outlook 2007
      • Power Automate
        • Introduction to Power Automate
      • Power BI
        • Power BI
        • Power BI Intermediate
      • PowerPoint
        • PowerPoint 2021
        • PowerPoint 2019
        • PowerPoint 2016
        • PowerPoint 2013
        • PowerPoint 2010
        • PowerPoint 2007
      • Project
        • Project 2021 Beginners
        • Project for the Web
        • Project 2019
        • Project 2019 Advanced
        • Project 2016
        • Project 2016 Advanced
        • Project 2013
        • Project 2013 Advanced
        • Project 2010
        • Project 2010 Advanced
      • Publisher
        • Publisher 2013
      • SharePoint
        • SharePoint Online
        • SharePoint Foundation 2013
        • SharePoint Server 2013
        • SharePoint Foundation 2010
      • Teams
        • Microsoft Teams
      • VBA
        • Macros and VBA for Beginners
        • VBA for Excel
        • VBA Intermediate Training
      • Visio
        • Microsoft Visio 2019
        • Visio 2016
        • Visio 2013
        • Microsoft Visio 2010
      • Windows
        • Windows 11
        • Windows 10 (2020 Update)
        • Windows 10
        • Windows 8
        • Windows 7
        • Windows Vista
      • Word
        • Word 2021
        • Word 2019 Advanced
        • Word 2019
        • Word 2016
        • Word 2013
        • Word 2010
        • Word 2007
    • QuickBooks
      • QuickBooks
        • QuickBooks Desktop Pro 2022
        • QuickBooks Pro 2021
        • QuickBooks Online Advanced
        • QuickBooks Online
        • QuickBooks Canada
        • QuickBooks Pro 2020
        • QuickBooks 2019
        • QuickBooks 2018
        • QuickBooks Pro 2017
        • QuickBooks Pro 2016
        • QuickBooks Pro 2015
        • QuickBooks Pro 2014
        • QuickBooks Pro 2013
        • QuickBooks Pro 2012
        • QuickBooks Pro 2011
        • QuickBooks Pro 2010
        • QuickBooks Pro 2009
    • Web Development
      • AngularJs
        • AngularJS Crash Course
      • Dreamweaver
        • Dreamweaver CC
        • Dreamweaver CS6
        • Dreamweaver CS5
        • Dreamweaver CS4
      • Bootstrap
        • Bootstrap Framework
      • Html/CSS
        • HTML/CSS Crash Course
        • HTML5 Essentials
      • Python
        • Python Object-Oriented Programming
        • Pandas for Beginners
        • Introduction to Python
      • Java
        • Java for Beginners
      • JavaScript
        • JavaScript for Beginners
        • jQuery Crash Course
      • MySql
        • MySQL for Beginners
      • PHP
        • PHP for Beginners
        • Advanced PHP Programming
      • XML
        • XML Crash Course
    • Data Analysis
      • Financial Modeling
        • Financial Risk Management
        • Financial Forecasting and Modeling
      • Alteryx
        • Alteryx Advanced
        • Introduction to Alteryx
      • Power BI
        • Power BI Intermediate
        • Power BI
      • Qlik Sense
        • Qlik Sense Advanced
        • Qlik Sense
      • R Programming
        • R Programming
      • Tableau
        • Tableau Desktop Advanced
        • Tableau Desktop
      • Python
        • Python Object-Oriented Programming
        • Pandas for Beginners
        • Introduction to Python
    • Work Productivity
      • Google Sheets
        • Google Sheets for Beginners
      • Confluence
        • Introduction to Confluence
      • Monday
        • Getting Started in Monday.com
      • Asana
        • Asana for Employees and Managers
        • Introduction to Asana
      • Jira
        • Getting Started in Jira
  • For Business
  • About Us
    • Testimonials
    • Contact Us
    • FAQ
    • Membership
    • About Us
  • Pricing
  • Free Resources
  • Sign In
  • Get Started
Home > Microsoft Excel > How to Add Leading Zeros in Excel? 4 Easy Methods

How to Add Leading Zeros in Excel? 4 Easy Methods

(Note: This guide on how to add leading zeros in Excel is suitable for all Excel versions including Office 365)

Excel, despite being one of the most commonly used spreadsheet software, can be confusing to use at times. Leading zeros in Excel is a good case in point. I am almost certain that you tried adding leading zeros to your data (something like 007281) but with no success. 

This is because Excel automatically removes all the leading zeros from numbers since it prioritizes calculations over formatting. Though the intention behind this seems reasonable, it can be very frustrating if you want to add leading zeroes to your data for maintaining records. 

Don’t worry. In this guide, I’ll teach you how to add leading zeros in Excel, using 4 easy methods. 

Table Of Contents
  1. Add Leading Zeroes by Formatting to Text
  2. Add Leading Zeros Using Custom Formatting 
  3. Add Leading Zeros Using the TEXT Function 
  4. Add Leading Zeros in Excel Using an Apostrophe 
  5. Closing Thoughts

Related:

The Excel SMALL Function – 3 Best Examples

How to Make An Excel Forecast Sheet in 3 Steps – The Best Guide

How to Use Excel COUNTIFS: The Best Guide

Add Leading Zeroes by Formatting to Text

The easiest way to add leading zeros in Excel is to simply convert the formatting from Number to Text. 

But, use this method only if you are not planning to use the converted numbers in some form of calculations. 

Now, let us see how to do this: 

  1. Select the range of cells where you want to insert the numbers with leading zeroes. 
Select the range of cells
Select the range of cells
  1. Click on the drop-down menu in the Number group of the Home tab and choose Text from the list. 
Choose Text from the Number group
Choose Text from the Number group
  1. Now try adding leading zeros to your numbers. This time, Excel will allow you to keep the newly added leading zeroes. 
Type your numbers with leading zeros
Type your numbers with leading zeros

Add Leading Zeros Using Custom Formatting 

Sometimes you may want to retain the number formatting of these leading zeros for the sake of calculations. If that is the case, converting the numbers to text doesn’t make sense. 

We will have to find a workaround to do this. Let us see how: 

  1. Select the relevant cell range where you want to insert the leading zeroes. 
  1. Press the Ctrl+1 keyboard shortcut. This will open the Format Cells dialog box. Alternatively, you can click on the small arrow at the bottom corner of the Number group of the Home tab. 
Click here to open the Format Cells  dialog box
Click here to open the Format Cells dialog box
  1. Go to the Numbers tab in the Format Cells dialog box and click on the Custom category. 
Open the Custom category in the Number tab
Open the Custom category in the Number tab
  1. Enter the desired number of digits, inside the ‘Type’ box and click OK. 
  1. This will make Excel display your numbers with the desired number of leading zeros automatically attached to them. Let us say, you entered ‘0000’ in the Type box. When you enter 45 in any of the selected cells, it will be displayed as 0045. Similarly, if you enter 123, it will be displayed as 0123. 
Excel will add leading zeros automatically
Excel will add leading zeros automatically

Also Read:

How to Add Error Bars in Excel? 7 Best Methods

How to Superscript in Excel? (9 Best Methods)

Excel Goal Seek—the Easiest Guide (3 Examples)

Add Leading Zeros Using the TEXT Function 

What if you want to enjoy the benefits of both formats? That is, keep your numbers for calculations but display them as a text for ease of use. 

Fortunately, this is possible in Excel, thanks to the TEXT function. 

To do this, just follow these steps: 

  1. Let us say you have the numbers arranged in the column D2:D10. Select the range E2:E10 and enter the formula : TEXT(D2, “0000”), where you can change the number of zeroes according to your preferences. 
  1. Double click on the Fill Handle or simply use the Ctrl+Enter shortcut to enter this formula in your selection. 
Add leading zeros using the TEXT function
Add leading zeros using the TEXT function

This will immediately convert all your numbers with the relevant leading zeros in the E2:E10 column, while still retaining the numbers in the D2:D10 column. 

You can keep using the original column for calculations and the new one for viewing or presentations. 

Add Leading Zeros in Excel Using an Apostrophe 

Don’t have time for all this? Thankfully, there is an easy way to instantly force Excel to add leading zeroes. 

All you need to do is append an apostrophe (‘) at the beginning of every number. This will force Excel to display the number as it is. 

But keep in mind that this actually converts the numbers to text and hence cannot be used in calculations. 

Keep leading zeros using an apostrophe
Keep leading zeros using an apostrophe

Suggested Reads:

How to Shade Every Other Row in Excel? (5 Best Methods)

How to Extract an Excel Substring? – 6 Best Methods

How to Split Cells in Excel? 3 Easy Methods

Closing Thoughts

Leading zeroes can sometimes be very critical to maintaining the formatting uniformity of your database. But, unfortunately, Excel does not directly allow you to keep them in your data. 

You can bypass this restriction using any one of the methods discussed above, which suits you best. Whatever you do, always be mindful of the final formatting type of your data. 

If you need more high-quality Excel guides, please check out our free Excel resources center.

Simon Sez IT has been teaching Excel for over ten years. For a low, monthly fee you can get access to 130+ IT training courses. Click here for advanced Excel courses with in-depth training modules.

(trilogymedicalcenter)

Simon Calder

Chris “Simon” Calder was working as a Project Manager in IT for one of Los Angeles’ most prestigious cultural institutions, LACMA. He taught himself to use Microsoft Project from a giant textbook and hated every moment of it. Online learning was in its infancy then, but he spotted an opportunity and made an online MS Project course - the rest, as they say, is history!

Most Popular Posts

  • Kanban vs Scrum: Project Management Methodologies and Their Differences [2022]
  • How to Insert a Checkbox in Excel? 3 EASY Examples
  • How to Autofit Excel Cells? 3 Best Methods
  • XLOOKUP Google Sheets – 4 Best Alternatives!
  • Dashboards in Excel Using Pivot Tables, Pivot Charts and Slicers
  • Free Microsoft Project Training Course
  • Free Microsoft Access Tutorial for Beginners (3.5 Hours Video)
  • How to Use Blending Mode With Layers in Adobe Photoshop Elements 15

Similar Posts

Paying for Items in QuickBooks 2019

Inserting a Table in Dreamweaver CS6

Managing Microsoft Outlook 2010 with Mailbox Rules

Creating Bills for Inventory Items in QuickBooks 2019

Introduction to Using Layers in Adobe Photoshop Elements 15 – Part 2

How to Use Excel 2010 Pivot Tables and Charts – Part 3

Course Categories

  • Adobe
  • Data Analysis
  • QuickBooks
  • Microsoft
  • Web Development
  • Work Productivity

About Us

  • About Us
  • Free Resources
  • Affiliates
  • Become an Instructor

Products

  • Pricing and Plans
  • Business Pricing
  • Government Discounts
  • Non-Profit Discounts

Support

  • FAQ’s
  • Contact Us
  • DVD support

Connect

YoutubeFacebookLinkedIn
© 2023 Simon Sez IT, Inc.
  • Terms
  • Privacy Policy
  • Sitemap
888.817.6665 Monday thru Friday 7:30 a.m. - 5:00 p.m. (ET)