Chart: only show legend elements with values

Brython

New Member
Joined
Nov 21, 2013
Messages
3
Hi guys
I have 10 graphs with more than 20 legend entries. However, each graph only needs 3-4 elements out of the 20 legend entries in the graph.
Is there any way to force Excel to only show those legend entries that have a value? (without deleting them manually)
Thanks in advance!
 
You can use + for Or:


Excel 2010
BCDEFGHIJKLMNOP
1School TypeDevicesStaffSchool TypeDevicesStaff
2Primary205Primary205
3Secondary50050Secondary50050
4College40030Secondary120070
5Secondary120070Primary5012
6Primary5012
7College8016
Sheet1
Cell Formulas
RangeFormula
N2{=IFERROR(INDEX(B$2:B$500,SMALL(IF((($B$2:$B$500="Primary")+($B$2:$B$500="Secondary")),ROW(B$2:B$500)-ROW(B$2)+1),ROWS(N$2:N2))),"")}
O2{=IFERROR(INDEX(G$2:G$500,SMALL(IF((($B$2:$B$500="Primary")+($B$2:$B$500="Secondary")),ROW($B$2:$B$500)-ROW($B$2)+1),ROWS(O$2:O2))),"")}
P2{=IFERROR(INDEX(J$2:J$500,SMALL(IF((($B$2:$B$500="Primary")+($B$2:$B$500="Secondary")),ROW($B$2:$B$500)-ROW($B$2)+1),ROWS(P$2:P2))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Thank you!!

You've helped me create one heck of a spreadsheet!! Well, two now as it needed breaking down lol, but I wouldn't have been able to do it without your help!!
 
Upvote 0
Nope, turns out there's one more question...

I'm trying to do a scatter graph from these latest results, when I select just the data, the scatter graph obviously works perfectly, when I select more cells at the bottom (I want to set it to use about 500 rows) it ignores the data in the first column and decides they're a numerical count so the first row is 1, second is 2 etc.

I've tried creating Dynamic Ranges like I did for the other data, which seems to work, but when I try using those Dynamic Ranges in the Select Data window, it doesn't let me enter it... Saying the Formula you typed contained an error...

Does that make sense? Should I be able to use dynamic ranges with Scatter Graphs?
 
Upvote 0
Define RatD_PriDev as:

=OFFSET(Ratios!$J$4,0,0,COUNT(Ratios!$J$1:$J$500),1)

You're too good!!!! Thank you, again!! Can I buy you a bottle of wine or something as a thank you? I would have given up hunting long ago if you hadn't helped me so much! :)
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,073
Members
449,093
Latest member
ripvw

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