Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Use list of keywords from sheet B to search string on sheet A, if match then show value from different cell from Sheet B – String Search & Categorize

I am trying to use a list of keywords in sheetB ColumnB to search strings in sheetA ColumnB.

If the string has a match to the keywords, I would like to return the value of sheet B column D into the Sheet A column G

I have tried this one:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

=map(B2:B,lambda(Σ,if(Σ="",,ifna(regexextract(Σ,"(?i)"&textjoin("|",1,SheetB!B2:B))))))

This formula is extremely close, it find the matches, but it does not cross over the value I need from SheetB ColumnD in place of the match.

Example google sheet:

https://docs.google.com/spreadsheets/d/1qH_pXfHttFmmpr_1ve7TrRQcRzU9fFcfealMJrxm21s/edit?usp=sharing

I will keep this sheet active forever to help others.

As always, I really appreciate all of the help from Stack Exchange. I absolutely love this community!

>Solution :

Add xlookup to the existing function:

=map(B2:B,lambda(Σ,if(Σ="",,xlookup(ifna(regexextract(Σ,"(?i)"&textjoin("|",1,SheetB!B2:B))),SheetB!B:B,SheetB!D:D,))))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading