dynamic chart with no label for label at 0

cidfidou

Board Regular
Joined
Jan 19, 2009
Messages
163
Hi guys,

i am trying to create a dynamic chart with dynamic series.

As an example lets take a list of users for which a specific quantity is assigned per week. We only want to plot the user for which the total quantity assigned is >0 across two weeks let say

Data source (below table starting in D1)


week1week2Total
User1000
User2000
User3303
User4000
User5505
User6000
User7000
User8000
User9000
User10707

<tbody>
</tbody>


Data sorted from datasource (below table starting in I1)


week1week2
User330
User550
User1070
#N/A#N/A
#N/A#N/A
#N/A#N/A
#N/A#N/A
#N/A#N/A
#N/A#N/A
#N/A#N/A

<tbody>
</tbody>

I have used below formula in above table to only show user 3 ,5 and 10 as their total is > 0

I2 = {IFERROR(INDEX($D$2:$D$16;SMALL(IF($G$2:$G$16>0;ROW($G$2:$G$16));ROWS(I$2:I2))-ROW($G$2)+1);"")}
J2=VLOOKUP($I2;$D$2:$F$11;2;FALSE)
k2=VLOOKUP($I2;$D$2:$F$11;3;FALSE)


and then I have used some dynamic range formula to plot above table

user = =$I$2:INDEX($I$2:$I$16;COUNTIF($I$2:$I$16;">"""))
week1 =$J$2:INDEX($J$2:$J$16;COUNTIF($I$2:$I$16;">"""))
week 2 = =$K$2:INDEX($K$2:$K$16;COUNTIF($I$2:$I$16;">"""))


So my question is, how can we remove a data label from legend when there is no value. In my example I would like to remove week 2 showing in the legend of the Chart and from the bottom of the chart as it is taking some space for nothin? the issue is that I could have at least 10 weeks and dont want see in them in the chart...


Hope this is clear
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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