View Single Post
  #2   Report Post  
John Mansfield
 
Posts: n/a
Default

Charley,

Outside of using VBA, you could try deleting the Y-axis labels and adding a
dummy Y-axis in its place. If you were using an XY-Scatter chart, the dummy
Y-Axis would consist of columns 1 and 2 below. Column three is a direct
reference to column 2 (for example C1=B1, C2=B2, etc.). Format column 3 as
TEXT.

Use a chart labeling add-in such as Rob Boveys X-Y Labeler or John
Walkenbachs Chart Tools to set up a reference to the TEXT formatted data
labels. When complete, each Y-axis data label will appear in the same format
as the data in column 3 below.

0 1.09 1.0856
0 2.01 2.01
0 3.01 3.011
0 4.01 4.01056
0 3.02 3.02
0 6.01 6.014

Regards,
John Mansfield
http://www.pdbook.com


"Charley Kyd" wrote:

I'm looking for an automatic way to format the value axis with the least
number of digits possible after the decimal. I want the format to switch
from #,##0 to #,##0.0 to #,##0.00, etc. as needed.

That is, I never want the Y axis to display the same number twice, because
that means we need to add more digits to the right of the decimal. And I
never want the Y axis to display "0" in every right-most character after the
decimal, because that means we need to reduce the number of digits
displayed.

Other than using macros, can anyone suggest a way to display the least
number of digits after the decimal?

Thanks.

Charley