Put 0 In Front Of Number

i have a field that has a number in it for example

i want these to always be 4 digits and put zeros in front of the number
how can i do this

Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

Keep Leading Zeros in Numbers in Excel - 2 Ways
I'll show you 2 ways to add and keep leading zeros in front of numbers in Excel. These two methods are very simple ...
Convert Scientific Notation to Numbers in Excel
How to convert scientific numbers to show their full amount; this method also allows you to retain the appearance o ...
Input Really Long Numbers into Excel
How to input any length number in Excel and have it remain visible. Excel truncates any number longer than 15 char ...
How to Use Multiple Functions and Formulas in a Single Cell in Excel
Lets learn how to put multiple functions and formulas in a single cell in Excel in order to build more complex form ...

Helpful Excel Macros

Format Cells as a Scientific Number in Excel Number Formatting
- This free Excel macro formats selected cells in the Scientific number format in Excel. This means the cell will be put
Format Cells in The Short Date Number Format in Excel
- This free Excel macro applies the Short Date number format to a selection of cells in Excel. This number format display
Filter Data Sets on Multiple Columns with Multiple Criteria at Once in Excel - AutoFilter
- This Excel macro allows you to filter a data set on multiple columns and criteria at once. This means that you can filt
Filter Data to Show the Top X Number of Items in Excel - AutoFilter
- This Excel macro filters a data set to display only the top X number of items in that data set in Excel. This means tha
Filter Data in Excel to Show Rows/Data That Meet Multiple Criteria for One Field - AutoFilter
- This free Excel macro filters data in Excel based on multiple criteria for one field in the data set. This macro uses t

Similar Topics


Can someone please help with adding zeros to the front of a number? Each cell needs to be 12 digits. Any cell with less than 12 digits need zeros in front. Examples below:

CURRENTLY: 4122235443 (10-digits)
NEEDS TO BE: 004122235443 (12-digits)

CURRENTLY: 57655599900 (11-digits)
NEEDS TO BE: 057677799900 (12-digits)

CURRENTLY: 108877443322 (12-digits)
NEEDS TO BE: no changes needed

Thanks in advance!

I have a field in my Access query that is called RequisitionNbr. The numeric data in this field is not consistent as far as the digits. There are some cells with 1 digit number, 2 digit numbers 3 digit numbers, 4 digit numbers etc. I want to add zeros in front of all cells in that field with < 4 digits. Example if this field has 1 digit number like 3, I want the result to be 0003. If it has 2 digits like 24, I want the result to be 0024. If it has a 3 digit number like 424, I want the result to be 0424. Anything 4 digit and above should just be left alone. How can I put this in a query in access. Thanks for your help

I have a lot of record that contain number like shown below:

I want to remove all 0 in front of this number in excel. Can anyone here help me.. I use excel 2007..

I already try using formula


=IF(     LEFT(A1) = "0" ,     RIGHT(A1, LEN(A1)-5),     A1)

but it only remove 5 character in front what about the number that have 6 '0'......
Please help..

Thanks in advance.

Why do 16 digit numbers convert? Is there a way to format the cell rather than adding the ' in front of the number to stop the conversion?
This number 4.50542E+15 should look like 4505420254200425, but when I add the ' in front of the number the last digit changes to zero 4505420254200420. Every time we miss this, it costs us money.


Could any one please help me adding apostrophe (') in front of the data with number format only?

I have a list of part numbers that I am trying to import to Access. But after importing the records with format "number" appear as "#Num!". But if I add apostrophe in front of the records then the record appear fine in Access. But the apostrophe should only be in front of the numbers only not in front of text.

I am new to writing codes in VBA so can't separate numbers from text for adding apostrophe. Any help is appreciated.


How can I type a number with zeros in front ie 00345 and save sheet as a CSV keeping the 00's showing. I have made the cell a text cell which works fine in Excel but when I save as a CSV file it changes and the zeros disappear.

I am working on this project & I cant figure out how to add a letter in
front of each number in a cell without clicking in to each individual cell
and typing it in. (very time consuming and tedious) The problem is - it's not
all the cells but a majority, all of the numbers are in the same column. To
explain, these are documents in storage. Each item is assigned a number (not
in any particular numerical order but they have to stay in the order they are.



The last three numbers need the X in front of them.

Any ideas? Thanks so much!!

I read this previous reply and I'm not getting it.......I'm Excel challenged

Use a help formula


copy down/across, then copy and paste special as values in place ,
finally replace the old values with the new


Peo Sjoblom

I need to format a single column of numbers to always have 4 digits. If the cell contents is less than 4 digits, then I need it to concatenate with preceding zeros to bring the total number of digits always to 4.


3205 is ok
905 is not ok....need it to be 0905.

I need to concatentate vs converting to text so the value includes the zeros. These numbers are constantly being input via web query, so a formula in the cell will get wiped out. Possibly need a vba macro to run after the query has finished.

Thanks for any help.

Dear Friends,

I am wanting to create a VB script that will take a number (in general format) of two or three digits, convert it to text, then make sure that there are enough zeros preceeding the number to make exactly 6 digits. Examples of the initial number (before the macro is run) and the final number (after it is run):

initial number: 34 (general format)
final number: 000034 (in text format)

initial number: 345 (general format)
final number: 000345 (in text format)

Can anyone help?

Thank you so much,

I am working with data loaded from a PDF, and this was one of the things I am having to deal with. I have tried a few things to move the negative sign in front of the number, but can't seem to get a way to do it to all of them. Just to show you a little more clearly


I can't do much sorting either because the format of the data is a little weird due to converting a PDF, and I want to be safe.

Thanks in advance

I have a row of numbers that need juxtaposed.
For example: if the number appears as 0051-72
I need to change it to 72-0051

The numbers all start with the 2 digits, separated by (-) and then the 4 digits

so, basically I need to take the last 2 digits and move them to the front separated by the dash.

all numbers are different...and I have 130,000 to fix.

is there a simple script or formula I can run on this column?

Any help would be greatly appreciated.

I am running a report with mobile numbers. and it gives me the numbers ( 7197757123) however i need to add dialling code 44 in front of these . as there are 20,000 of these i need a forumla to help.

so place 44 in A1 and the mobile number in b1, then i need a forumula for c1 to place a1 in front of b1

any help would be appreciated


I am trying to create a spreadsheet so that I can auto populate Cells depending on the quantity of parts requiring a serial number. Our serial number format looks like this "1102-0001" Basically 11 is the year, 02 is the month followed by 4 digits. For the next month the serial number would change to "1103-0001". Basically the month number changes and the 4 digits go back to 0001.
At present I have a front end page which I populate with all the part info required, then this is automatically copied into sheet 2. So sheet 2 is the long list of parts. Unfortunatley this is a pain if I have a part if we are making lots of exactly the same product but each one has to have its own serial number.
Ideally I need something where if the first serial number lets say is 1102-0001 and I could put 10 off in another cell, I would then click a button that says generate then a Macro would go and copy all the info from sheet 1 10 times onto the list on sheet 2 exactly the same but just changing the serial number accordingly, so the last one would be 1102-0010. Please let me know if any body else has tried to do something like this and has a solution.

Hi i need a VBA code to remove the last two digits of the cell and it should add a two zeros in that place,

For Ex: its 12345678 it should be 12345600 and this is applicable only if the cell value is above 6 digits if its below 6 digits it should display the actuals only for ex it is 123456 it should not execute the above told conditions and display as it is. is this possible guys please help.

Hi guys I've spent ages trying to work this out with no joy
Basically I have a list of numbers, and i need to add 1 char to the front of the number and make it into a 5 digit number.

Heres an example

Number------------------- Needs to Look like this
12--------------------- S00012
14--------------------- S00014
15--------------------- S00015
20--------------------- S00020
50--------------------- S00050
100-------------------- S00100
354-------------------- S00354
555-------------------- S00555
666-------------------- S00666

I have over 1000 rows of these numbers that need to be changed so I was hoping that there is some sort of formula that will do this for me, any help would be greatly appreciated


P.S sorry for previous wrong post

In order to import data into an accounting program, the account number has to be formatted with an apostrophe at the front. I've tried formatting as text. I've tried ="'"&a1.
Other than manually adding it to each number, is there any way to add the apostrophe?

Hi all.

I have a userform which enters several entries on to two spreadsheets (dependant on a checkbox on the form)

If the entries are to be changed I wanted to use the same userform to replace the entries on the worksheet- What I need is VBA code to check the customer's account number is already present, then overwrite the entries on the worksheets thus replacing the original data. Is this possible? Im sure it is but I'm not sure how to do it. Any help greatfully accepted.

Ideally I would also like a way of users checking if an entry already exists on the worksheets. The workbook currently has a front sheet with a macro box to bring up the userform. The data sheets are hidden to stop the data being tempered with.

Is there a way that if the account number could be input on the front page and then the data could be retrieved and displayed on the front page? Also namechecking the name of the sheet

Any help on these two issues would really be great.

Many thanks in advance.

I'm trying to get cells containing numbers and text to align in the column. This would be easy to solve with custom number formatting if I was only displaying numbers. For example, cell A1 contains the number 2 and cell A2 contains the number 56. Both cells are left-justified. With general number formatting, the number 2 in A1 aligns with the number 5 in A2. If I format the cells with a custom number format of "???" then the number 2 in A1 aligns with the number 6 in A2. In other words, the "ones", "tens", "hundreds" places in the column line up. However as soon as I add text after the number, the formatting reverts to normal, i.e. I no longer get the space in front of single-digit numbers. I tried using custom number format "???;;;@" but that didn't help. The only way I can get the numbers to align is to pad single digits with a leading "0". Is there a way to do what I'm trying to do? I have attached a .jpg file illustrating the problem if the above is not clear.

I have an exported CSV file that needs to be uploaded into another system for a 911 database. I have over 4000 entries and in one column, I have the extension numbers of my users which is a 4 digit number. I need to place my 3 digit prefix in front of these 4 digit numbers for the database to work correctly. The 3 digit prefix is the same number for all cells. The merge cell doesn't work. I need to do this on a weekly basis, so hopefully there is a simple formula or feature that would work.

Thanks for any input you may have.


I'm trying to have VLOOKUP only search the last digits of a number.

The number I'm searching for is 10 digits long, and the numbers I'm searching through are 11 or greater. The last 10 digits will always match, but the first digits are not always relevant.

Is this possible?


Sheet 1
A1 has 1234567890 (10 digits)
B1 I want to have the 5 digit number from Sheet 2

Sheet 2
A1 has 01234567890
B1 has 12345

Because of that "0" at the beginning (which can be any number at all, just using "0" as an example) VLOOKUP won't return anything.


I have 2 cells, one has a phone number and the other has a name. Example A1 Has Phone Number B1 Name. The phone number cell has a one in front of the number (12155551212) I need to remove the 1 from it.

Any suggestions ?

I need help

I want to insert table and i did . but its not coming in front of it . please advice.

sample below

Name: This is the place where i want the table to be .


but i m unable to align the table in front of name:

When updating a front end database what needs to happen to cause a update on another front end database?


I have a file in which on one of the tabs an equal sign is placed in front if numbers are entered. For instance, if I type "1/1/07" in the cell, instead of a date being entered, excel is putting an equal sign out front so it actually divides 1/1/07 giving a real small number.

There are other worksheets in this workbook, but they don't have this issue. I can't figure out what is going on. Any help would be much appreciated. Thanks.

I want to be able to see a number with a zero in front of it as in 019, no
decimals or anything but everytime I enter it and move to the next cell the 0
automatically disappears. Can anyone help?