View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill[_30_] Bill[_30_] is offline
external usenet poster
 
Posts: 89
Default Minimum Scale on Chart

Hello,
I have a chart that I am trying to scale based on the lowest value for the
category axis. I find the minimum value and then find the major unit and
divide it by 2. I set the min value (XMin) as being half the major unit
below the min value and then set the min scale to that value. Problem is
that I get long numbers sometimes (3.44444333, for example). I would like
to round that number down based on the number of the decimal places in the
major unit for the category axis. Is that possible? The code I have is:

MU = ActiveChart.Axes(xlCategory).MajorUnit / 2
XMin = Application.Min(database)
XMin = XMin - MU
ActiveChart.Axes(xlCategory).MinimumScale = XMin

Thanks much.

Bill