This is a bit tricky to describe, but here goes nothing. I’m trying to write a formula to display the contents of certain cells from a multi-column, multi-row range in an ordered, comma-separated list. It’s probably easier to illustrate this than describe it, really:
A B C
1 Name1 5 3
2 Name2 12 8
3 Name3 3 3
4 Name4 -2 -2
5 Name5 8 5
6 Name6 5 5
7 Name7 2 2
8 Name8 0 0
9 Name9 9 4
Ok, that’s basically what it’s like, except…bigger (7 columns by 30 rows, but only 3 columns are relevant for this).
What I’m trying to do is get the formula, which would output into a single cell, to scan those rows, and where the number in B and C doesn’t match up (B would always be higher than C in this case), display “A B” (including the space), and separate the entries with a comma and space, so that it would look like this: “Name1 5, Name2 12, Name5 8, Name9 4”.
I figured out how to do it very clumsily, with =IF(B1=C1,"",A1&" “&B1)&IF(SUM(B1:B$9)=SUM(C1:C$9),”",", ")) among others, but all of them have the problem of needing to add every row with addition &s (replacing the = at the front of each with & and sticking it on after). That would be fine, since the table size won’t ever change, but I’m running into error 512 (30 rows, remember - it adds up fast) and I’m almost certain there’s a better way to do this, a more elegant way, but I can’t figure it out…any help would be hugely appreciated!