Free Microsoft Excel 2013 Quick Reference

Horizontal (Category) Axis

How do I change the horizontal (category) axis so that the text in that area
is at a horizontal angle?
Maria A Adams

Post your answer or comment

comments powered by Disqus
How to put a NAME in the Horizontal category axis label. I have one called
temp, so in the Horizontal category axis label I write Temps,
the result: on my axis I see the word TEMPS. and not the values of that name

Dear all,

Apologies if this is a really basic quesiton, or if somebody else has already asked this same question in previous threads - this is my first time here...

Basically, I'd like to be able to change the value of the "x" (horizontal/category) axis so that the numbers START from 430, rather then from 1 - as the chart is for a passage in a piece of music that starts from bar 430. I'm using Excel 2008 on a Mac. If anyone can be of any help that'd be fantastic.

Thanks very much!


Hello Andy
I have made a chart with primary X (category) and y (value) axes. Now I need to add a series in secondary x (category) axis and same y axis. I am not able to bring in category x axis. It is giving secondary X (value) axis. Please help me--please. Currently I am using Excel 2007.

I have three charts representing the same data set. One chart is a stacked bar chart, set on its side to create a timeline. I also have a bar chart representing total time for each category. And a pie chart to represent percentage of overall time for each category. I created a code that, when a certain category, in the case "Go" occurs, it will make that bar the same color as a specified cell. These categories are formatted as a bunch of series within the chart. The code I created for it is as follows
Dim myseries As Series

    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.SetSourceData Source:=Range("Chart")
    ActiveChart.PlotBy = xlRows

    For Each myseries In ActiveChart.SeriesCollection
        If myseries.Name = "Go" Then
            myseries.Interior.Color = Cells(1, "AA").Interior.Color
    Next myseries
I have a series of If statements for each possible category to appear on this timeline. The myseries.Name call makes this easy. This code works. I am attempting to do a similar code for the other two graphs (referring to cell AA1).

However, my other two graphs are set up as 1 series with many data points (same category labels). Is there a way I can set up the coloring on the graphs to look for the horizontal (category) axis label and if it says "Go" then make that data point(bar) become the same color as AA1? This type of code will make my life much easier so that I am not always changing colors.

I am very new to VBA and am not great at coding at this point. However, here is my idea so far (I think my syntax might be off but I am unsure)

vnt = ActiveChart.SeriesCollection(1).Values
    For i = 1 To UBound(vnt)
        If ActiveChart.SeriesCollection(1).Points(i).AxisLabel = "Go" Then
            With Selection.Format.Fill
                .ForeColor.ObjectThemeColor = Cells(8, "AA").Interior.Color
            End With
        End If
    Next i
Thanks in advance!


I do not seem to be able to consistently control word wrapping in the Category Axis area in the series of charts I create quarterly. The individual names appearing are basically the same, but sometimes they word wrap and sometime they don't. In the attached sample, sheet C2-Location: PPO chart is just the way it needs to be - NO WORD WRAP. But if you change that chart to another location it word wraps. (To change locations, go to sheet D2 which controls sheet C2 chart, and change the location to SGO.) It appears that the less bars in the chart the greater the problem.

I have spent 2 1/2 hrs trying to get in control of this. I have changed font sizes, changed the plot area, changed the grid lines scale, changed the cell size on the originating sheet (D2), removed the check mark in Auto Scale on the Font tab, and stretched/reduced the entire chart without consistent success. What is most frustrating is that twice I have "accidently" gotten a chart to all of a sudden not word wrap but don't know why because when I try to repeat what I think I did before, it does not work!

Additionally, at times it may appear correct on the screen, but when I do Print Preview, it is word wrapped! I have searched multiple sites and googled multiple Excel solutions as well as pulled out some books but cannot find any references regarding how to control this.

Please help. Kathryn


Below are the codes that I used to make a chart. I have months on category axis and some names as legend. I want the opposite construction on the chart. I want the names on category axis and the legends as months. The data is in "Chart3_Data" sheet and the name of the sheet where the graph is located is "Saldo_Graph" sheet. On "Chart3_Data" sheet the 1st coloumn has the names and the 2nd,3rd and 4th coloumn has the data for the months.

grij = [a65536].End(3).Row 
Range(Cells(1, 1), Cells(grij - 1, 4)).Select 
Application.CutCopyMode = False 
ActiveChart.ChartType = xlColumnClustered 
ActiveChart.SetSourceData Source:=Sheets("Chart3_Data").Range(Cells(1, 1), Cells(grij - 1, 4)), _ 
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Saldo_Graph" 
With ActiveChart 
    .HasTitle = True 
    .ChartTitle.Characters.Text = "SALDO" 
    .Axes(xlCategory, xlPrimary).HasTitle = True 
    .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Technicians" 
    .Axes(xlValue, xlPrimary).HasTitle = True 
    .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Total Hours" 
End With 
With ActiveChart 
    .HasAxis(xlCategory, xlPrimary) = True 
    .HasAxis(xlValue, xlPrimary) = True 
End With 
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines



Hi - I need to label the category axis with doses with units of 'mg kg-1' where the '-1' is superscript. I have acheived this in the spreadsheet but when this is used to label the category axis the superscript '-1' has changed to normal size. What do I need to do to keep the '-1' in superscript form in chart? By the way, I'm using Excel 2000 in Windows XP.
Thanks for any help!

Does anyone know how to center the category axis (e.g. age groups 0-4, 5-9, 10-14, etc) in an Excel Histogram chart. At present this axis is positioned to the left of my dual histograms (i.e. male population on left side & female on the right). I want a space between these two sides of the histogram with the age group labels appearing next to the appropriate bars.

I hope this is clear enough. Thanks for any help you can provide.


Are there any tricks/chances to rotate more than one level of category axis
labels of a bar chart?


I would like to draw a bubble chart with category axis eg.
with following data:

mon sun 5
mon rain 4
tue sun 1
tue cloudy 2
tue rain 7
wed sun 3
wed rain 8
wed cloudy 4

So on the x-axis I would like to see the labels mon, tue, wed; on the
sun, cloudy, rain and the size of the bubbles is given by the numbers.

Is this possible in Excel XP and how to proceed?

Thx for your attention,


Mijn Postvak In wordt beschermd door SPAMfighter
14511 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis vandaag nog!


I have four columns of data, the first two of which belong to one condition,
the second two belonging to condition two. I want to compare performance
between the two conditions on the same graph by separating the two. I have
added a column between the two conditions to create a gap, and selected the
'plot empty cells as: not plotted' option. I am now wondering if I can change
the category (X) axis to accommodate this? At the moment I cannot get rid of
the 'spare' value on the category axis. Does anyone know of a way around this?

I am trying to make long category axis labels to fit in a single line. Excel
automatically breaks them in two lines, but it is too crowed and difficult to
read. I tried leaving space in blank below the labels, thinking that if it
was enough space for labels to fit in a single line Excel would automatically
make the change, but it didn't work. Any ideas?


I'm trying to align my category axis of my chart to the bottom of my plot
area. I have some negative data and it's moving the date (category axis) into
the data of the plot area.

Hope this make sense. Thanks!!

I have a stacked bar chart, with total values of the bars being negative
or positive.

Can I place the Category Axis (X-axis) at the bottom of the chart,
without specifying a specific number?

Now I have put a fixed number on the scale tab for the Value axis (Y)
for "Cuts Category Axis (X) at".

This is rather inconvenient as the minimum values can change from one
run to another.

rvExcelNewTip's Profile:
View this thread:

I have a chart where some of the category axis' labels are too long and I
would like for them to wrap into two lines. is there a way to do this?

Dear experts!

I have a column chart. Category axis labels are either time ("hh:mm")
or empty ("") cells. If first value in the label range is time,
e.g. ("13:00"; ""; "14:00"; ""), everything is fine, in the opposite
case, e.g. (""; "13:00"; ""; "14:00"), labels are not displayed. It
seems that the chart calculate required space for labels according to
the first value in the label range.

Is there any way to solve this problem, so labels will be displayed
regardless of the fact if first value in label range is empty or not?

Thanks, Marko.

How do I add data on the Axis Major Gridlines next to the Category Axis
Collums in Excell? I have created a chart with collums ident. each moth of
the year. I would like to add data on the gridline next to the collums.
Please do not spam

I want to name the "0" marker on the category axis (i.e., TARGET) - instead
of "0" but leave the remaining values in place (i.e., 10, 20, 30). Is there
a way to do this (i.e., -30, -20, -10, TARGET, 10, 20, 30, etc.) If not, is
there a way to have the plotted color one color above the "0" and a different
color below the "0"?

I have 2 sets of about 7000 data points in a line chart and have a column of
with sporadic labels at selected positions. In Excel 2007, selecting
this range (7000 rows, say 30 if which have a label) as the category labels
setting the label spacing as one, I can only get the very first label to show
on the chart. By playing around with the label spacing, I can sometimes get
the first 2 labels to display (but cannot understand why) but cannot get all
my labels to display as expected (and as they would under previous versions
of Excel). Can anyone tell me how to get all my labels to display (at their
appropriate positions)? The behaviour remains the same whether the range
contains sporadic text data or formulae whic resultmaninly in blanks with a
few resulting in text. (I have some sets of time data, but for a few months
in different years, which I want to plot on a single chart, not using a time
axis as this would have most of the space dedicated to the dates with no
data... I have used a formula to lablel only the 1 and 15 of the month at
midnight and these are the labes I would like to get on my category axis.)
Many thanks and best wishes, Boris,

I would like to create a scatter chart where the x axis is the value axis and
the y axis is the category axis, and I can't seem to figure out how to switch
the two.

My axis is all packed together, it is not possible to read, how to fix that.

Suppose I have the following data set:
(x-axis) (y-axis)
Date Price
01/01/03 $10.00
02/01/03 $20.00
03/01/03 $30.00
04/01/03 $40.00
05/01/03 $50.00
06/01/03 $60.00

I make a simple x-y line chart and it shows all the dates on the x-axis and the price on the y-axis. Say I only want to show the 2nd, 4th and 5th date on the x-axis. Is it possible to "turn-off" the rest of the text on the x-axis. It seems that excel treats the x-axis as a whole (a category axis object) and doesn't allow you to change the attributes of it's "sub-objects" such as the text of the 2nd, 4th and 5th data points. Is this assumption correct? Is there a way to get at the sub-components of the category axis object via vbe? Any help/insight would be appreciated.

I have a titration curve that has volume of NaOH added on the category axis.
The units are going from 0.6 to 1.0 to 1.6 to 1.9 in crazy increments.
There's no rhyme or reason between units, so it's messing up my graph. I've
tried everthing to try to make the units go in uniform (0.5, 1.0, 1.5 etc)
units with my data points wherever inbetween, but nothing is working! Please

I am setting up a chart to graph daily numbers.

This will be used for every month of the year, so am setting the category axis for the numbers one through thirty-one. e.g. 1, 2, 3, ... , 29, 30, 31

The chart is displaying the categories as 1, 2, 3, ... , 19, 2, 2, 2, ... , 3, 31. All numbers display as they should up through 19. However once there is a 2 or 3 in the significant digit the numbers are truncating, except for the 31.

How do I increase the display area for the X-Axis?

No luck finding an answer? You could always try Google.