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?
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Item | Matching keys | Item | Key | |
| 2 | foo | apple,testing | foo | apple | |
| 3 | anything | bar | orange | ||
| 4 | bar | orange,something | foo | testing | |
| 5 | another thing | bar | something |
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.