Skip to main content

[Excel] How to add zero before a number in Excel

Use Apostrophe

The easiest way to add zeros in front of numbers in Excel is to add apostrophe (‘) before zeros.



This automatically converts numbers into texts so you will see a green triangle at the top-left corner of the cell indicating an error. Click “Ignore error” to proceed.

Text Formatting

You can simply change the number format to text to keep the leading zeros in numbers. To do this, follow the instructions below:


1. Right-click on the cell(s) where you want to add the leading zeros.

2. Select Format cells.


                          


3. The Format Cells dialog box will appear. Select Text from the category options.

4. Click OK.


                          

Custom Formatting

If you don't want the data to appear as text and you want to keep the number value, you may apply custom formatting. To do this, follow the instructions below:


1. Right-click on the cell(s) where you want to add the leading zeros.

2. Select Format cells.


3. The Format Cells dialog box will appear. Select Custom from the category options.

4. Enter zeros in the "Type" box. In the "Sample" box above, it will show how the value will appear in the cell.

5. Click OK.


                                

Apply Formula

TEXT Function


Example:


Where:

B2 = cell number where to get the original value
0000 = string length or the number of digits of the new value

REPT Function


Example:

Where:

0 = value (zero) to be added
2 = number of values (zeros) to be added
B2 = cell number where to get the original value
                

CONCAT Function


Example:


Where:

0000 = number of values (zeros) to be added
B2 = cell number where to get the original value

Use Ampersand


Example:


Where:

000 = number of values (zeros) to be added
B2 = cell number where to get the original value

Comments

Popular posts from this blog

[Excel] How to Remove Password in Excel

  If you know the password of your Excel file and you want to delete it, there are several ways on how to do it. Remove password from "Info" panel 1. Open the encrypted Excel file. 2. Enter the password and click OK . 3. On the upper left corner, click the File tab. 4. In the left-hand panel, click Info and Protect Workbook to open the drop-down menu. 5. Select Encrypt with Password and delete the password that appears in the text field. 6. Click OK . 7. Go to File menu and click Save . Remove password from the "Review" tab 1. Open the encrypted Excel file. 2. Enter the password and click  OK . 3. On the main ribbon menu, click the Review tab. 4. Click Unprotect Sheet and enter the password. 5. Select Protect Sheet and click OK without entering a new password. 6. Go to the File menu and click Save . Remove password using the "Save as" option 1. Open the encrypted Excel file. 2. Enter the password and click  OK . 3. Go to the File tab and select S...

[Google Sheets] Linking Data to Cell Ranges, Sheets and Another Spreadsheet

Google sheets is part of Google Workspace that organizes data in columns and rows for reporting and data analysis. In this tutorial, you will learn how to link data within tabs, between multiple tabs and from one spreadsheet to another. Before you begin To get started, go to sheets.google.com and select "blank" to open a new blank sheet. Linking Data Below are the different ways to link data in google sheets: Linking within tabs Linking between multiple tabs Linking from one spreadsheet to another Linking data within tabs 1. Click anywhere on google sheets and type anything. 2. Right-click and select Insert link. 3. Click Select a range of cells to link. 4. The "Select a data range" box will appear. 5. Select another cell within a sheet where you want to link your data. 6. Click OK . 7. Verify the cell address before you click Apply . Linking data between mul...

Productive Laziness: Achieving More by Doing Less

This blog is created for people who use Microsoft 365 and Google Workspace at work so they can utilize these platforms to its full potential. It also aims to reach people who are new to this to help them leverage their skills in the workplace. Both services offer productivity tools that can automate repetitive tasks and processes to get things done faster with less effort and better quality. Read this blog to learn how we can be "lazy" and "productive" at the same time with the help of these applications.