• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Return a different value depending on which List a corresponding value is from.

ellistyle

New Member
I have 2 lists of numbers 1,3,5 and 2,4,6. If the value in a cell contains a number from list 1, I want value x returned. If the value contains a number from list 2, I want value y returned.


In reality my 2 lists are huge. I know this can be done with an array formula of some sort, but I can't figure it out. I also don't want to write a huge nested if formula if I don't need to.


How can I do this?
 
Assuming the cell is A2, this is the structure of the formula:

=IF(ISNUMBER(MATCH(A2,List1,0)),"X",IF(ISNUMBER(MATCH(A2,List2,0)),"Y","Not found in either list")
 
Back
Top