Good advice. Thanks.
So now my formula looks like this:
=TRIM(MID(SUBSTITUTE(","&$A2,",",REPT(" ",300)),COLUMNS($B:B)*300,300))
And this create a table that looks like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]COL A[/TD]
[TD]COL B[/TD]
[TD]COL C[/TD]
[TD]COL D[/TD]
[TD]COL E[/TD]
[/TR]
[TR]
[TD]Apple,Banana,Pear[/TD]
[TD]Apple[/TD]
[TD]Banana[/TD]
[TD]Pear[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana,Watermelon,Grape[/TD]
[TD]Banana[/TD]
[TD]Watermelon[/TD]
[TD]Grape[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Grape,Lemon,Watermelon,Kiwi[/TD]
[TD]Grape[/TD]
[TD]Lemon[/TD]
[TD]Watermelon[/TD]
[TD]Kiwi[/TD]
[/TR]
[TR]
[TD]Lemon,Lime,Kiwi,Pear[/TD]
[TD]Lemon[/TD]
[TD]Lime[/TD]
[TD]Kiwi[/TD]
[TD]Pear[/TD]
[/TR]
</tbody>[/TABLE]
Note that I created a named range called "RangeFruits" covering $B:$F.
This is perfect (thanks again). Now I need the pie chart. Here's my thinking:
- Col F: Left blank so as to avoid confusion between sets of data
- Col F: A formula that lists out all the unique values in alphabetical order. The number of rows needed depends on the data.
- Col G: The count of instances of each unique value within the "Fruits" named range.
Example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]COL A[/TD]
[TD]COL B[/TD]
[TD]COL C[/TD]
[TD]COL D[/TD]
[TD]COL E[/TD]
[TD]COL F[/TD]
[TD]COL G[/TD]
[TD]COL H[/TD]
[/TR]
[TR]
[TD]Apple,Banana,Pear[/TD]
[TD]Apple[/TD]
[TD]Banana[/TD]
[TD]Pear[/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Apple[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Banana,Watermelon,Grape[/TD]
[TD]Banana[/TD]
[TD]Watermelon[/TD]
[TD]Grape[/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Banana[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Grape,Lemon,Watermelon,Kiwi[/TD]
[TD]Grape[/TD]
[TD]Lemon[/TD]
[TD]Watermelon[/TD]
[TD]Kiwi[/TD]
[TD]----[/TD]
[TD]Grape[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Lemon,Lime,Kiwi,Pear[/TD]
[TD]Lemon[/TD]
[TD]Lime[/TD]
[TD]Kiwi[/TD]
[TD]Pear[/TD]
[TD]----[/TD]
[TD]Kiwi[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Lemon[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Lime[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Pear[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]----[/TD]
[TD]Watermelon[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I looked at some online forums and tried monkeying around with some formulas, but... no joy.
This is what I have so far, but it's way off the mark, I think:
=INDEX(RangeFruits,MATCH(0,COUNTIF(RangeFruits,"<"&RangeFruits)-SUM(COUNTIF(RangeFruits,"="&G$1:G1)),0))
What am I doing wrong?
Thanks,
Shawn