Search code examples
excelvbachartsscale

Excel VBA - Major Unit Scale in minutes


Is there a way to set the Major Unit Scale in minutes? The begin and end time doesn't matter. Example:

00:00 00:01 00:02 00:03 00:04
Horizotal axis ->

Thanks for helping me out!


Solution

  • Found it!

    Type this: YourChart.Axes(xlCategory).MajorUnit = 1 / (24 * 60)

    Now the scale for the horizontal axis is set to minutes.