https://docs.google.com/spreadsheets/d/1vizdH7_Eb5E7f1aHZY6TX_P6xqdxOhqMked2us1EXFI/edit?usp=sharing
I have three columns: A2:A6 contains letters like A or B B2:B6 contains names C2:C6 contains names
A name can appear in both column B and C, like "joe" or "ivan".
How can I create a list with unique names, where the names only appear on the same row as letter B in A2:A6?
Please try:
=unique(transpose(split(textjoin("|";;query(A2:C7;"select B,C where A = 'B'"));"|")))
QUERY selects the B
entries, TEXTJOIN unites them, SPLIT splits the combination, TRANSPOSE turns from by column to by row and UNIQUE excludes duplicates.