user626528
user626528

Reputation: 14409

How to change axis value labels orientation?

I have a chart in Excel; I need to change orientation of text labels in one of the axis programmatically. Ideas?

Upvotes: 8

Views: 48846

Answers (2)

Alen
Alen

Reputation: 1075

Layout tab (which appears when you have a chart selected) -> labels -> axis titles.

or

Right click the chart axis -> format axis -> Alignment

or

VBA solution as Jean-François Corbett pointed out

Upvotes: 1

This will change the orientation of the X-axis tick labels.

ActiveChart.Axes(xlCategory).TickLabels.Orientation = 45 ' degrees

This is how to change the orientation of the axis title:

ActiveChart.Axes(xlCategory).AxisTitle.Orientation = 81 ' degrees

Have you ever tried recording macros? If not, you should! Looking at the resulting code is a great way to quickly learn this type of thing.

Upvotes: 13

Related Questions