• 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.

if function query

Hi Guys,

I'm trying to get an if statement to work.

Please see attached sheet.

How many arguments can you put in an IF statement?

Regards

Brian
 

Attachments

  • formula query.xlsx
    8.8 KB · Views: 2
The IF function takes 3 arguments:
Logic Test, Value if True, Value if False

I think you are wanting to see if D4 is in either of two lists. We can check that with a couple of IF functions, as the 3 possible outputs are:
  1. It's in List A
  2. It's in List B
  3. It's in neither list

Formula:
=IF(ISNUMBER(MATCH(D4,A4:A7,0)),B4,IF(ISNUMBER(MATCH(D4,A9:A12,0)),B9,"No matches"))
 
Back
Top