0

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")))
  • What is isn't parsing? Are you getting a syntax error - then which one? Is the syntax OK, then what are the actual versus expected results? – Jan Doggen Jan 29 at 13:32
  • Minor update, my formula now is : =IF(SomeSheetName!A2=(REGEXMATCH("Johnny","Johnny")), SomeSheetName!A2=(REGEXMATCH("Dan","Dan")), "nosir") and I get the ELSE clause, "nosir", but the referenced sheet/cell value is indeed "Johnny". – Nate Brink Jan 29 at 13:36
  • OK the REGEXMATCH wasn't working either so trying FIND: =IF(FIND("Johnny",SomeSheetName!A2,1),"Johnny", FIND("Dan",SomeSheetName!A2,1),"Dan", "nosir" ) still no dice... – Nate Brink Jan 29 at 14:00
  • Please add some sample A2 values and the respective expected results. – Rubén Jan 29 at 14:57
  • Edit all that into your question please. And make sure that the answer to my and Rubens questions is in there as well. – Jan Doggen Jan 29 at 14:57
0

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

0

=IF(Sheet3!A2=FILTER(Sheet3!A2, ISNUMBER(SEARCH("*Johnny*", Sheet3!A2))), "Johnny",
 IF(Sheet3!A2=FILTER(Sheet3!A2, ISNUMBER(SEARCH("*Dan*"   , Sheet3!A2))), "Dan"   , "nosir"))

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.