View Single Post
  #3   Report Post  
Charley Kyd
 
Posts: n/a
Default

John,

Unless I'm missing your point, you're mostly talking about data labels. I
want to automatically control the number format of the value axis. About 99%
of the time, the charts will be line charts and column charts. No XY-Scatter
charts.

I don't see any alternative to using a Sub. Not even a UDF could work.

I just hoped that I was missing something.

Charley



"John Mansfield" wrote in message
...
Charley,

Outside of using VBA, you could try deleting the Y-axis labels and adding
a
dummy Y-axis in it's 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 Bovey's X-Y Labeler or John
Walkenbach's 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