Google-sheets – Google sheets grabbing info depending on other column

google sheets

Essentially I'm trying to figure out a formula that checks if Column A has the string "example", then grab the data in the corresponding row for Column B.

So if A1 says "Example" grab B1 data but I need to do this for multiple rows at the same time if possible.

Best Answer

Column A   | Column B | Column C
My example | 100      | =IF(ISERROR(FIND("example",A1)),"",B1)

FIND function is case-sensitive. If you want a case-insensitive search you should use SEARCH function.

If your string can vary, you can place it in cell D1, for instance and reference to it:

=IF(ISERROR(FIND($D$1,A1)),"",B1)

If the string is variable per row, add a third column

Column A   | Column B | Column C | Column D
My example | 100      | example  | =IF(ISERROR(FIND(C1,A1)),"",B1)