How to align decimals and limit number of sig fig's displayed

M

MrShorty

Sample data table (assume upper left is R1C1):
exponent formula
-2 =EXP(RC1)
0 =EXP(RC1)
2 =EXP(RC1)
4 =EXP(RC1)

Column 2 will contain the values (rounded to 3 decimal places)
0.135
1.000
7.389
54.598


What I want to be able to do is display 2 significant figures in th
column and have the decimals stay lined up. In searching, the usua
format code given for decimal align is 0.0??, but this format cod
would give me the same display as above. What I want to display woul
look like:
0.14
1.0
7.4
55.
with the decimal points lined up.

My current approach uses number format codes like this:
0.00
0.0_0
0.0_0
0._0_0
This is functional, but it gets tedious and time consuming to manuall
input those format codes when you have a large table. What I woul
like to do (once I figure out the code) is create toolbar button
analagous to the "increase decimal" and "decrease decimal" buttons tha
will increase and decrease the number of spaces (_0's) in the numbe
format code.

Another approach that I'm considering is to use a ROUND function linke
to a cell in which I can calculate or hand enter the number of decimal
to display. Then I could use the 0.? style format code. However, I'
not fond of ROUND functions because of the lost precision (the cell'
value becomes the rounded value rather than the original doubl
precision value). This isn't a problem in tables that are purely fo
display/printing purposes. In cases where the full double precisio
value is needed, all one would have to do is store the double precisio
value elsewhere and reference it. This isn't necessarily a bad option
but it's still my second choice rather than my first.

Anybody got other options
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top