superscript in source data does not appear in chart


K

Kate

When creating a chart in excel. I have superscript font in my source data
column/legend, but it does not appear as superscript in the chart?
 
Ad

Advertisements

B

Bernard Liengme

The character formatting does not carry over from cell to legend or titles.
You will need to format each in the each. Or use a font with superscript
digits.
best wishes
 
S

ShaneDevenshire

Hi Kate,

Here is a little more detail -
1. If you format the cell in the spreadsheet with super/sub script that will
not be interpreted any place on the chart correctly.
2. If your superscript happens to be one of a very few characters which
actually have a superscript character in their character sets you can use
that. For example, if you are using Arial you will find it has a
superscripted 2 and 3. You can get to these via Insert, Symbol.
Unfortunately this option is very limited, I have 600 font sets on my
computer and none are strictly superscript, but maybe someone has created a
font set that does this.
3. In certain limited areas of the chart you can select individual
characters and use Excel's superscript command. This works for any text for
which you can select individual characters (it also works for text you can't
individually select but that pretty useless). You can't select the
characters in the legend, or the axis elements for example, but you can
select individual characters in the titles, data labels and textboxes.
Depending on how much you need these in one of the areas that doesn't allow
it you can create dummy items to handle it. This is a lot of work and not
very satisfactory, but you can create superscripted axis entries by using a
dummy data series for the axis and applying data labels, or using text boxes
over the legend areas.

If you want a sample of one of these, tell me which one and what version of
Excel you are using and I'll send you one.

You can Google Superscript fonts and download a fontset if you can find one
you like.
 
B

Brian Reilly, MVP

Kate,
I use superscript in charts all the time to show statistical testing,
e.g. 42A where the A is superscripted. We do it by puttiing the
superscript text in the comments and then somehow adding them back to
the data label values. It's actually quite fast. My developers wrote
the code so I cannot explain it, probably can't even find it (g), but
if you need more of an explanation of how to do this with VBA, I can
send the code to Jon Peltier and Andy Pope and they can explain it
better than I can.
I forget who actually should get credit for this technique but it was
suggested by one of the MVP's in this group.

Brian Reilly, PowerPoint MVP
 
J

Jon Peltier

The way I've done this using VBA is to have the code copy the value from the
cell (text only), insert it without a link into the label (linked content
cannot support separate formatting within the text), then step through the
cell's text character by character, and apply the formatting to the label's
text character by character. If the formatting involves more than just a
couple formatting properties (i.e., bold, italic, color, font name, sub- and
superscript), the label will lose some of the formatting of the cell. This
works with data labels, axis and chart titles, shapes (including textboxes),
but not with axis tick labels. But you can fake those with data labels.

If your only real property of interest is sub- and superscripting, it should
work well enough.

- Jon
 
B

Brian Reilly, MVP

Jon,
Since you didn't include code here, I can comment (vbg). We do it by
storing the stat text value in the cell Comment and stepping through
it datapoint by data point and appending the comment text string to
the datapoint value. I think I learned this technique from you or
Tushar a while back. If it wasn't actually you, I apologize to him or
her, but you still get the credit cuz I didn't create the solution.

Brian Reilly, PowerPoint MVP
 
Ad

Advertisements

J

jilly.shrubs

Jon,
Since you didn't include code here, I can comment (vbg). We do it by
storing the stat text value in the cell Comment and stepping through
it datapoint by data point and appending the comment text string to
the datapoint value. I think I learned this technique from you or
Tushar a while back. If it wasn't actually you, I apologize to him or
her, but you still get the credit cuz I didn't create the solution.

Brian Reilly, PowerPoint MVP
Hi! How do you do this??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

data source for chart 1
Chart Source Data 5
Chart data source 6
Source Data in Charts 1
Chart Data Source 1
chart source data 1
Chart Data Source 3
Change Source Data in Chart 3

Top