I have following task for my Google spreadsheet: JOIN strings in all cells that are to the right of certain id.
SELECT A, JOIN(',', B) GROUP BY A, WHERE A = myid;
if JOIN was an aggregation function.=JOIN(',', VLOOKUP(A:B, myid, 0))
if VLOOKUP could return all occurences, not just first one. Is this possible with Google Spreadsheets?
I believe you could use the FILTER
function instead of VLOOKUP
to filter a range based on an ID and then JOIN
the returned range.
The documentation for FILTER
is here: https://support.google.com/docs/answer/3093197
For example:
=UNIQUE($A:$A)
in D2 to get all the IDs. =IF($D2="", "", JOIN(",", FILTER($B:$B, $A:$A=$D2)))
and then copy it down.