Custom scientific notation format not working

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,532
Office Version
  1. 365
Platform
  1. Windows
I would like to modify the standard scientific notation format so that it shows 2 decimal places to the left and none to the right. So 123 million (123,000,000) would be "12 E+07" rather than "1.2 E+08".

Here's an example. The default format is in C. The format I tried is in E. It works perfectly in E4 & E5, but in E6:E9, it has a leading zero. How can I get those to work like the ones above?
C/RCDEF
30.0 E+00Formula00 E+00Description
46.4 E+11=COMBIN(52,13)64 E+10Number of possible hands (13 cards)
58.1 E+67=FACT(52)81 E+66Number of possible deals (4 hands)
620,136=NumberHands/60/60/24/36502 E+04Years at one hand/second
72.6 E+60=NumberDeals/60/60/24/36503 E+60Years at one deal/second
87.5 E+187.5E+1808 E+18Number of grains of sand on earth
91.4 E+101380000000001 E+10Number of seconds since the Big Bang

<tbody>
</tbody>

Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Not always. For each of the examples, there is a format that works. The problem is that it may not work for the others.

I realised this was wrong and edited my reply as quickly as I could. The Excelribbon article is interesting.
 
Upvote 0
... I realised this was wrong...
To my knowledge, the scientific format with no fractional decimals shows the exponent as follows:

##E+00 the exponent will be a multiple of 2
###E+00 the exponent will be a multiple of 3
####E+00 the exponent will be a multiple of 4
and so on.
 
Upvote 0
It's odd that MS decided to tie the number of significant digitsin the mantissa to the way the exponent is displayed. I can't see the rationality behind it.
 
Last edited:
Upvote 0
It's odd that MS decided to tie the number of significant digitsin the mantissa to the way the exponent is displayed. I can't see the rationality behind it.
It is actually standard scientific notation. The E is short for "multiplied by ten to the power of", so when you write 12.34E5 that should be read as "twelve point three four times ten to the power of five", or, in number format...

12.34*10^5

which is 12.34*10000 and that becomes 1234000 when multiplied all the way out. Look at it this way...

12345 is the same as 12345*10^0 (any number raised to the zero power is 1 and 1 times any number is just the number itself), so the following all represent the same number, 12345...

etc.
12345000*10^-3
1234500*10^-2
123450*10^-1
12345*10^0
1234.5*10^1
123.45*10^2
12.345*10^3
1.2345*10^4
0.12345*10^5
0.012345*10^6
etc.

It really does not matter how you write... the OP opted for showing a maximum of two leading digits (and suppressing the decimal part if any)... the power of 10 must adjust for the given number in order that the underlying value does not become a different number from the original.
 
Upvote 0
But why would they decide that if your mantissa is formatted ##, the exponent will always be a multiple of 2; if the mantissa is formatted ### then the exponent will be a multiple of 3; if the mantissa is formatted #### then the exponent will be a multiple of 4, etc? Why would the exponent need to be a multiple of anything except 1?

Why does a format of #0E+00 display 3000 as 30E+02 and not 3E+03?

How does Jennifer achieve what she wants using Excel's formatting facilities?
 
Last edited:
Upvote 0
... Why does a format of #0E+00 display 3000 as 30E+02 and not 3E+03?..
3000 formatted as 0E+00 ==> 3E+03 (exponent should be a multiple of 1; mantissa should have only 1 digit)
3000 formatted as #0E+00 ==> 30E+02 (exponent should be a multiple of 2; mantissa can have up to 2 digits)
3000 formatted as ##0E+00 ==> 3E+03 (exponent should be a multiple of 3; mantissa can have up to 3 digits)
3000 formatted as ###0E+00 ==> 3000E+00 (exponent should be a multiple of 4; mantissa can have up to 4 digits)
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

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