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

[Microsoft Forms] Creating a Form

Microsoft forms is a browser-based tool that allows users to create custom surveys, quizzes and polls in minutes and provides real-time results. Assumptions :  You are an Office 0365 Education and/or Business user.   Intended Audience :  Someone new to Microsoft Forms Level :  Beginner Creating a Form 1 . Go to   https://forms.microsoft.com . 2 . You can choose to create a New Form or a New Quiz . 3 . When you select a New Form , a new blank form will be displayed. 4 . Click the Untitled Form to change the title. 5 .  Enter a description to give the user an idea of what the form is about. 6. Click Add New so you can add a variety of question types to your form.                                                        7. The 'Choice' option allows you to add multiple-choice questi...

[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...

[Microsoft Flow] How to Automatically Save Microsoft Form Responses to SharePoint

Microsoft Flow is a new part of O365 services that allows users to automate tasks and connect different applications and services together. Assumptions : User has basic knowledge in SharePoint and Microsoft Forms Intended Audience :  Someone new to Microsoft Flow Level:  Beginner Requirement : Create a Flow that will collect responses from Microsoft Form and add it automatically to a SharePoint list Ready your Microsoft Form Check out this post to learn how to create a simple Microsoft Form. Ready a SharePoint List Check out this post to learn how to create a SharePoint list. Creating a Flow Once the Form and the SharePoint list are ready, we will connect them together using Microsoft Flow.  1. Log into  https://flow.microsoft.com. 2. Click My flows in the left navigation bar. 3. Click New flow and select Automated cloud flow. 4. Before you create your flow, click on 'Untitled' and enter a name for your flow. 5. From the list of apps and tools, select Microsoft...