Forum Discussion

Chaitanya_Palley's avatar
Chaitanya_Palley
Copper Contributor
Jul 11, 2022
Solved

String Match part of an array with repeated strings in duplicate records and return value

Hi, I have a dataset like below in Sheet3 as in the screenshot with ID, country and number where country column has 2 letter country codes as array of multiple countries together unique to a ID and ...
  • OliverScheurich's avatar
    OliverScheurich
    Jul 11, 2022

    Chaitanya_Palley 

    =IF(SUM(N(IF((sheet3!$B$2:$B$7=sheet4!H7)*ISNUMBER(SEARCH(sheet4!G7,sheet3!$C$2:$C$7))=1,MATCH(IF((sheet3!$B$2:$B$7=sheet4!H7)*ISNUMBER(SEARCH(sheet4!G7,sheet3!$C$2:$C$7))=1,sheet3!$D$2:$D$7),IF((sheet3!$B$2:$B$7=sheet4!H7)*ISNUMBER(SEARCH(sheet4!G7,sheet3!$C$2:$C$7))=1,sheet3!$D$2:$D$7),0)=ROW($1:$6))))>1,"Multiple",INDEX(sheet3!D$2:D$7,MATCH(1,(sheet3!$B$2:$B$7=sheet4!H7)*ISNUMBER(SEARCH(sheet4!G7,sheet3!$C$2:$C$7)),0)))

     

    This formula seems to work in my sheet. The formula has to be entered with ctrl+shift+enter if one doesn't work with Office365 or 2021. Do you happen to work with Office365 or 2021? I think with the help of the UNIQUE and FILTER formula it would be a lot easier to do this.

     

Resources