Minh Tao
Minh Tao

Reputation: 43

Google Sheets - Find a cell value in another column and return first cell that CONTAINS the string

I've been looking for hours but no luck. Please have a look at my below question. Thank you!

I'd like to find row values in one column (let's say "product keyword") that are texts like this: apple, banana... in all rows of a column in another sheet (let's call the column "product name"). These rows contain values like apple-ringer-1, banana-crowd-2... When the first row in "product name" column that contains product keyword is found, then it returns that product name value.

I've tried to use QUERY function but it seemingly does not search the product keyword in ALL rows in the product name column.

enter image description here

Thanks all.

Upvotes: 1

Views: 3834

Answers (1)

TheMaster
TheMaster

Reputation: 50383

You could use wildcards in VLOOKUP.

Assuming values to find are in A1:A2

 =ARRAYFORMULA(VLOOKUP("*"&A1:A2& "*",Sheet2!A1:A,1,0))

Upvotes: 0

Related Questions