View Single Post
 
Old 01-28-2020, 07:46 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Try, in B2, array-entering this formula:
Code:
=TEXTJOIN(", ",TRUE,IF(MATCH(IF(ISNUMBER(SEARCH(Varieties!$A$2:$A$20,$A2)),Varieties!$B$2:$B$20,""),IF(ISNUMBER(SEARCH(Varieties!$A$2:$A$20,$A2)),Varieties!$B$2:$B$20,""),0)=ROW(Varieties!$A$1:$A$19),IF(ISNUMBER(SEARCH(Varieties!$A$2:$A$20,$A2)),Varieties!$B$2:$B$20,""),""))
and copy down.

Not forgetting to add Rose to the list of Varieties on the Varieties sheet.

The simpler array-entered:
Code:
=TEXTJOIN(",",TRUE,IF(ISNUMBER(SEARCH(Varieties!$A$2:$A$20,$A2)),Varieties!$B$2:$B$20,""))
works but because you sometimes have multiple finds (eg. in row 7 you have HA HA MARL PINOT NOIR where both Pinot and Noir are found so the result shows as Pinot Noir,Pinot Noir, the more complex formula eliminateas those.


I'll leave you to envelop that formula in an IF statement to show Other when none are found.

Last edited by p45cal; 01-29-2020 at 04:43 AM. Reason: spelling
Reply With Quote