Reputation: 63
This isn't super complex, but it's got a bunch of moving parts and I'm struggling to put them all together. Have tried various fixes and solutions but can't make it work.
PROBLEM
I've got a list of values. I want to take those values (individually), look for them in a separate array, and if a match is found take the value of the cell NEXT to the match and concatenate all values in one cell.
Here's a quick example
Basically I want to dynamically populate column B. To do this I need to take the ref values in column A, look for each of them in the list of "Favorite Fruits", and when found grab the name in the column next to it and concatenate the names with commas in a single field.
Thoughts? Like I said, it's not a tough problem, just a lot of moving pieces (which I guess makes it a tough problem). Any help is appreciated.
Thanks! Rick
Upvotes: 1
Views: 124
Reputation: 432
Try putting this in Cell B2
:
=TEXTJOIN(", ", TRUE, IF($D$2:$D$15=A2, $E$2:$E$15,""))
make sure and lock it in as an array formula with Ctrl+Shift+Enter
Then drag/copy down to populate each needed cell.
Upvotes: 1
Reputation: 1
B2Formula: {=CONCAT(IF(A2=$D$2:$D$15,$E$2:$E$15 & ",",""))}
Introduce with ctrl+shift+Enter to make it matricial formula "{=Formula}" after that just drag the formula.
Upvotes: 0