Conditional chart series

  A B C D E F G H
1   Type 1 Type 2 Type 3 Type 4 Type 5    
2 Day 1 28 10 9 6 5    5
3 Day 2 18 12 5 5 12    
4 Day 3 25 4 11 4 6    
5 Day 4 11 5 4 2 1    

Hi, i want to make a bar chart using the data above which looks something like this:

 

I want that:
IF H2=5, then all 5 series (Type 1, Type 2, Type 3, Type 4, Type 5) should appear in the chart. (Range =B2:F5)
IF H2=4, then only (Type 1, Type 2, Type 3, Type 4) should appear. (Range =B2:E5)
IF H2=3, then only (Type 1, Type 2, Type 3) should appear. (Range =B2:D5)
IF H2=2, then only (Type 1, Type 2) should appear. (Range =B2:C5)
IF H2=1, then only (Type 1) should appear. (Range =B2:B5)

(Values of cell H2 have been restricted using data validation to 1,2,3,4,5)

Is it possible to do this in excel? I have already tried using the IF statement in chart data range but it does not seem to accept the IF conditions.

Thanks in advance!!

By: Malik

Leave a Reply

Your email address will not be published. Required fields are marked *