Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How for each cell in a row return and concatenate multiple matches without dragging down formulas?

$
0
0

I have a list of items and in another place I have list that covers some of these items each time with a different key.

How to fill in column B all matching results next to the original item (column A) from column E without dragging the formula down manually?

ABCDE
1ItemMatching keysItemKey
2fooapple,testingfooapple
3anythingbarorange
4barorange,somethingfootesting
5another thingbarsomething

If dragging down then B2 and below will be:

=join(",", iferror(filter(E:E, D:D=A2), ""))=join(",", iferror(filter(E:E, D:D=A3), ""))=join(",", iferror(filter(E:E, D:D=A4), ""))=join(",", iferror(filter(E:E, D:D=A5), ""))

Ideally B2 would have been:

=arrayformula(join(",", iferror(filter(E:E, D:D=A2:A), ""))

But both array join and filtering by a more than 1 value (D:D=A2:A) aren't supported by Google Sheets.

Queries also don't seem to support it: =arrayformula(join(",", query(D:F, "select Col2 where Col1='" & A2:A & "'"))) acts as if it's just & A2 &.

It's a bit similar to How to concatenate all further columns from duplicated items of a first column? (which utilized a LET function), except this time it should be applied inside the original list and not as as standalone summary.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>