x-y scatter with alphabet scale

vbacoder

Active Member
Joined
Jul 7, 2007
Messages
354
Hi everyone,

Please could anyone suggest a way to generate an X-Y scatter plot that has an alphabetical scale on the y-axis? The letters map to a numerical scale, so I really want the chart to ignore the letters in the plot (focusing instead on the number scale), but display it on the y-axis.

One way could be to plot two time series, one invisible, setting the range of the plot. The other timeseries is the one of interest, and a secondary axis then displays letters. So, scaled by invisible numbers and chart, but displaying letters on y-axis. Achieving this is not straightforward, and I am not even sure if it is really possible.

I'd be grateful to hear from anyone who may have tried something similar.

1:K
2:L
3:M
4:N
5:O


Thanks,

vcoder
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi VoG,

Thanks for your reply. I was hoping not to use 3rd party software - I really want a solution in XL, even if it means having to write a bit of VBA.

vcoder
 
Upvote 0
Interesting, with the method shown in the previous link, you cannot enter more than two numbers for converstion into text..

Code:
    Range("Chart").Select
    ActiveSheet.ChartObjects("Chart_1").Activate
    ActiveChart.ChartArea.Select
    ActiveChart.Axes(xlValue).Select
    Selection.TickLabels.NumberFormat = "[=20] ""K"";[=19] ""L"""

...works, but adding one additional letter to the last line throws an 1004 runtime error: "Unable to set NumberFormat property of the TickLabels class"
Code:
Selection.TickLabels.NumberFormat = "[=20] ""K"";[=19] ""L""; [=18] ""M"""

So, basically it's not letting me assign more than two numbers to text - is there a way around this?

Please could someone offer assistance with this if you've seen this before?

Many thanks,

vcoder
 
Last edited:
Upvote 0
Please, if anyone knows a way around this it would be greatly appreciated.

Thank you

vcoder
 
Upvote 0

Forum statistics

Threads
1,216,151
Messages
6,129,162
Members
449,489
Latest member
spvclub

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top