When I enter a number like 8230e12 into a Microsoft Excel 2000 cell, Excel changes the number I entered into 8230000000000000. (This is what I get when I press F2 to edit the cell's contents, not what Excel displays in the cell). How can I force Excel to keep the data in the format I typed it and still be able to format it and use it as a number? Displaying the cell in scientific notation is not enough, because the exponent is not the same one as the one I typed.

link|improve this question
feedback

5 Answers

up vote 5 down vote accepted

If you wish Excel to keep the cell formatted exactly as entered, i.e. 8230e12, regardless of whether you are looking at it or editing it, then this can't be done whilst retaining the ability to treat the cell contents as a number.

The only way I can see round this is to enter your data in cells that are formatted as text, and then have another cell, formatted as some kind of number, that has a formula of =VALUE(A1) or whatever so that calculations can be performed on this cell.

Other than that you are looking at some VBA to manage this, overkill I would have thought.

link|improve this answer
I also think this is the only option. The reason is, that Excel stores only the value and not exactly how you entered it. So if you enter 8,23e15 or 8235e12 or any other representation of the same number is not important for what Excel stores. When editing Excel uses the representation it thinks fits best - you have no control over that. – Turismo Sep 2 '09 at 11:30
feedback

Format the cell as custom number format and you can tweak the display to whatever you need. E.g. "0000E+12" will display your "8230e12" as "8230E+12"

link|improve this answer
As I wrote in the question, I'm not interested in the display, but on the way the data I entered gets reformatted as a formula. – Diomidis Spinellis Sep 2 '09 at 8:55
Sorry, I obviously misunderstood. If you enter '8230e12', Excel stores this as '8230000000000000'. Is this not the same value? You could enter '=8230*10^12' ?? – FoleyIsGood Sep 2 '09 at 9:47
feedback

I had success in solving what I think is a similar issue to yours. All I did was create a custom format of "'#" (note the apostrophe before the hash) and applied it to the column containing the numbers that needed to be viewed in their 12+ digit form. My values were still correct though as the columns were initially set to general.

link|improve this answer
feedback

Try formatting the cell as a number with 0 decimal places (or in the case of the number you presented, the decimal places are irrelevant).

link|improve this answer
This changes the display, not the original data. – Diomidis Spinellis Sep 2 '09 at 8:56
My mistake ( for 15 characters). – Stevoni Sep 2 '09 at 11:51
feedback

Widen your column enough to show the full number. If your column sizes are too small, Excel will automatically format the number in scientific notation.

link|improve this answer
I am not interested in the display format, but in the format of the data when edited. – Diomidis Spinellis Sep 2 '09 at 8:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.