= If (in list)

  • Thread starter Thread starter PJS
  • Start date Start date
P

PJS

Hi everyone,

What is the excel fuction for "in list", where cell value equals to a list
of values?

If A1 = "this list of values" then "1" else If A1 = "another list of values"
then "2" ?

end results
if CA is by definition in Group 1, the function would recognize CA and
return the value 1, and NY by definition in Group 2, return the value 2?

States Group
CA 1
NY 2

thanks!

PJS
 
If I understand you correctly (your example seems somewhat ambiguous to
me), one way:

Assume your list of States and Group is in Sheet2!A1:B51. Then in Sheet1,


=VLOOKUP(A1, Sheet2!A2:B51, 2, FALSE)

or, if it's possible that A1 won't be found:

=IF(ISNA(MATCH(A1, Sheet2!A2:A51, FALSE)), "Not Found", VLOOKUP(A1,
Sheet2!A2:B51, 2, FALSE))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top