Formatting of chart elements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way of changing the font of one only of a number of

a) category labels; an

b) data labels for a series?
 
Leslie -

(a) Sadly, no.

(b) Gladly, yes. (Give me a break, it's late.) Click once to select the
series of labels, then a second time to select the particular label,
then press Ctrl+1 to open the format dialog (or double click on it, or
choose Selected Item from the Format menu). You can even format
individual characters, as long as the label isn't linked to the text in
a cell.

The workaround for (a) involves (b). Make a custom axis that looks like
the existing axis using this technique:

http://peltiertech.com/Excel/Charts/ArbitraryAxis.html

Format the specific axis label differently than the rest.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
John, may I pursue just a little bit further the matter of formatting
differently one of a number of category labels?

As you said it had to be done by workaround in any event, I tried my own,
which seemed to work, subject to one peculiarity.

I deleted the contents of the cell in the source worksheet from which the
particular category label had come. I then created a text box at the
relevant point along the x axis and entered into it the word which had
formerly been the category label. I then formatted that word as I wanted,
namely, bolding it.

The only peculiarity was that, although the font tab insisted that that word
was in bold 8 point Arial, it looked distinctly (at least to my almost 60
year old eyes!) larger than other text on the chart which was also said to
be in bold 8 point Arial.

Is there some reason why doing what I did is inadvisable?
 
Leslie -

That's a workaround which is easier than the technique I suggested. It
also is less robust, because changing the data might change the axis,
but the textbox will stay where it is, and you'll have to manually move
it. Also, deleting a cell with a number will mess up the X value axis in
an XY Scatter chart.

I don't know why the font looked different, although I don't doubt your
observation. Excel is like that sometimes.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Linking a graph component, even a seemingly independent textbox, to a
cell will *not* transfer certain formatting at all (super/sub-
scripting) and will transfer only the current state of other format
characteristics (color, font).

What I do to deal with super/sub-scripts is create a textbox that is
*not* linked to any cell. This works very well as long as the name of
the series doesn't change. Now, color the text in that box with the
same color as the series in question. Finally, select the character(s)
that you want shifted off the baseline and select Format | Text Box...
Any font changes specified will apply only to the selected character.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
For a couple of projects, I've been able to write a VBA procedure to
step through the characters of a cell and its corresponding label, and
copy the specific character format (i.e., color or super/subscripting)
from the cell to the label. You cannot copy every bit of formatting for
each character, though. Some parameters are neglected or changed back
while setting others, and some get applied to the entire text element.
It's a frustrating adventure.

I haven't done this myself, but I've read the suggestion to find a
special font that includes sub and superscripted characters. This way,
you just specify the font; you don't need to format individual
characters in a text label.

What Tushar didn't mention is that you cannot format individual
characters of legend entries or axis labels, so finding a special font
is the only way to accomplish this for some text elements.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Thanks for your answers!

Jacob

Jon Peltier said:
For a couple of projects, I've been able to write a VBA procedure to
step through the characters of a cell and its corresponding label, and
copy the specific character format (i.e., color or super/subscripting)
from the cell to the label. You cannot copy every bit of formatting for
each character, though. Some parameters are neglected or changed back
while setting others, and some get applied to the entire text element.
It's a frustrating adventure.

I haven't done this myself, but I've read the suggestion to find a
special font that includes sub and superscripted characters. This way,
you just specify the font; you don't need to format individual
characters in a text label.

What Tushar didn't mention is that you cannot format individual
characters of legend entries or axis labels, so finding a special font
is the only way to accomplish this for some text elements.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Back
Top