How can I make it so that a cell is formatted to the point where whatever number I type in stays the exact way that I typed it

popcornrulez

New Member
Joined
Mar 15, 2013
Messages
35
Pretty much I just need to be able to have zeroes in front of numbers without converting the number to text. And also note that the numbers that I am going to be pasting in that cell need to be able to be any size and still be able to keep the zeroes in front of them.

popcornrulez
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Home - Format - Format Cells - Number tab - Custom - then in the box directly underneath "Type" enter 00000 (or as many 0's as you want displayed) -OK
 
Upvote 0
Pretty much I just need to be able to have zeroes in front of numbers without converting the number to text. And also note that the numbers that I am going to be pasting in that cell need to be able to be any size and still be able to keep the zeroes in front of them.

popcornrulez
One way is to enter the number with an apostrophe as a prefix: example '009876.
Although the number will look like text (left aligned unless you change the alignment), it can still be used as a number. Example: cell A1 contains '009876. In B1 enter: =SQRT(A1/2) --> returns 70.27 which is the square root of 4938 (9876/2).
 
Upvote 0
One way is to enter the number with an apostrophe as a prefix: example '009876.
Although the number will look like text (left aligned unless you change the alignment), it can still be used as a number. Example: cell A1 contains '009876. In B1 enter: =SQRT(A1/2) --> returns 70.27 which is the square root of 4938 (9876/2).

With this method when I type more than 10 digits with the apostrophe in front of the number it gives me the #NUM! error in the cells that have formulas that include that cell's number.
 
Upvote 0
Home - Format - Format Cells - Number tab - Custom - then in the box directly underneath "Type" enter 00000 (or as many 0's as you want displayed) -OK

This method would normally be fine with me if I was working with small numbers, but on occasion I will be working numbers that are big enough to the point where I don't want to use this method because I would have to count the amount of digits in the big number.
 
Upvote 0
This method would normally be fine with me if I was working with small numbers, but on occasion I will be working numbers that are big enough to the point where I don't want to use this method because I would have to count the amount of digits in the big number.
Works ok for me using 15 digits:
Excel Workbook
LMN
3009876543235895152222222.225
Sheet5
 
Upvote 0
This method would normally be fine with me if I was working with small numbers, but on occasion I will be working numbers that are big enough to the point where I don't want to use this method because I would have to count the amount of digits in the big number.

You only enter the 000000... one time in the Format Cells box. When you enter a number you do not enter the preceding 0's (ie: 000000789 would be entered as 789, and excel would display it in the cell as 000000789.

It might help us if you described the nature of your project, whether the data is being manually entered or from an imported datasource, the nature of formula's your using, and the results you want.
 
Upvote 0
You only enter the 000000... one time in the Format Cells box. When you enter a number you do not enter the preceding 0's (ie: 000000789 would be entered as 789, and excel would display it in the cell as 000000789.

It might help us if you described the nature of your project, whether the data is being manually entered or from an imported datasource, the nature of formula's your using, and the results you want.

My Project involves taking hexadecimal code from files and putting it into a cell. And with some file-types, there will be a bunch of zeroes in front of the hex data.
 
Upvote 0
With this method when I type more than 10 digits with the apostrophe in front of the number it gives me the #NUM! error in the cells that have formulas that include that cell's number.
My Project involves taking hexadecimal code from files and putting it into a cell. And with some file-types, there will be a bunch of zeroes in front of the hex data.
Can you clarify exactly what you are doing for us... the two text snippets I highlighted in red were taken from two of your posts and appear to conflict with each other.
 
Upvote 0
Right now I'm just in the testing phase, so I'm currently just typing hexadecimal code into the cell. But in the future, I would like to be able to either copy the hex data from a hex editor and then paste it into the cell, or figure out a way to import the hex data directly from the file into the cell. I'm trying to make a spreadsheet that compresses files. Since every file is different, I need a way to have the data that I paste/import into the cell to stay exactly the same as the hex data from the original file.
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,788
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top