Say I got a little table of data like so:
Say I want to make a simple bar chart with the "value" column as a series. The range for the value of that series is B2:B12. The name of that series is B1. The x-axis labels are A2:A12. Simple enough. Now, what if I just want a subset of the range where the corresponding "flag" value in that row is 1. In other words, I'd want to plot the following: B2,B3,B5,B8,B9,B10,B12.
Now, I can just seperate each cell ref by a comma to manually construct what I want, but there appears to be a limit to how many times I can do this, and it gets cumbersome if you had say 100 seperate cells to handle. It'd be better if there was a way to run through the range B2:B12, run an IF to check if the value in the C column is 1, and use that in the subset data range for the series.
I tried messing around with defines and the offset function, but I'm not looking for an offset range, I'm looking for a subset range.
Any help would be much appreciated.
-Matt
Code:
A B C
1 Value Flag
2 Jan 5 1
3 Feb 10 1
4 Mar 8 0
5 Apr 6 1
6 May 13 0
7 Jun 15 0
8 Jul 11 1
9 Aug 12 1
10 Sep 4 1
11 Nov 9 0
12 Dec 7 1
Now, I can just seperate each cell ref by a comma to manually construct what I want, but there appears to be a limit to how many times I can do this, and it gets cumbersome if you had say 100 seperate cells to handle. It'd be better if there was a way to run through the range B2:B12, run an IF to check if the value in the C column is 1, and use that in the subset data range for the series.
I tried messing around with defines and the offset function, but I'm not looking for an offset range, I'm looking for a subset range.
Any help would be much appreciated.
-Matt
Last edited: