markw
markw

Reputation: 51

Spreadsheet formula to gather all matches into one cell if matches exist

I'm using the formula in the answer to this post: Spreadsheet formula to gather all matches into one cell

My version is:

=ArrayFormula(CONCATENATE(REPT(Occupation!B:D&", ",Occupation!A:A=A2)))

Some of my Occupation!B:D cells are empty, though, so I'm getting results like "Attorney, , , ".

My question is where would I add an IFERROR or ISBLANK or IF <> "" so that nothing is returned if any of the cells on Occupation!B:D are empty.

Upvotes: 0

Views: 282

Answers (1)

JPV
JPV

Reputation: 27242

Try

=TEXTJOIN(", ", 1, FILTER(Occupation!B:D, Occupation!A:A=A2))

and see if that helps?

REFERENCE

Upvotes: 1

Related Questions