Google-sheets – Cell reference for contains value in Google Sheet

formulasgoogle sheetsregex

Looking for help referencing another spreadsheet, where I want to lookup several values in cell A2, to see if the value is contained in the cell (as there are variations), then setup an else clause at the end.

First crack isn't parsing:

=IF((SomeSheetName!A2=(REGEXMATCH("Johnny","Johnny")),
    (SomeSheetName!A2=(REGEXMATCH("Dan","Dan")),"nosir")))

Best Answer

=IF(Sheet3!A2 = "Johnny", "Johnny",
 IF(Sheet3!A2 = "Dan"   , "Dan"   , "nosir"))