LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to align decimals and limit number of sig fig's displayed


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

--
MrShort
-----------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...fo&userid=2218
View this thread: http://www.excelforum.com/showthread.php?threadid=47309

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
format decimals displayed based on results widman Excel Discussion (Misc queries) 3 October 17th 06 03:35 PM
How do I align decimals in Excel when not all numbers have % sym. sjgiles Excel Discussion (Misc queries) 2 September 7th 06 10:36 PM
Accounting format does not align decimals. Accounting Alignment Excel Discussion (Misc queries) 1 July 7th 06 08:42 PM
How do I limit the number of rows displayed on a worksheet? cms31 Excel Discussion (Misc queries) 4 December 8th 05 06:20 PM
How do I limit what text is displayed? Erik Millerd Excel Worksheet Functions 4 July 15th 05 11:51 AM


All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"