PDA

View Full Version : Axis Rounding (decimals, tens, hundreds, etc.)



Sock
07-03-2013, 12:03 PM
Hi everyone, I have yet another question. Hopefully this one is simple.

I have a VBA code that generates a "football field" type of graph based on user-entered specifications. It works fine, but it usually keeps whatever the default-created axis values are, but this typically makes an ugly graph where the bars can be squished.

I've uploaded four examples of how I'd like it to look. You can check the chart axis values to see what I've changed the minimum, maximum and major interval values.

You can see that I'm trying to figure out how to automate this, so the user doesn't have to worry about changing the axis values themselves.

I hope this was a clear-enough explanation of what I'm trying to do. As it stands now, I'm unsure on how I would handle this. I thought about using rounding or even logical expressions, but there has to be a better way, right?

Thank you so much again, you guys. I apologize for all these questions!

PS. It may be hard to see what makes the 4th example different, but the first value is much lower, but I've set the axis to go to -50 simply because the bars are much longer overall.