Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
All articles IF If Cell is X or Y and Z

If Cell is X or Y and Z

We can use a nested formula that combines the IF, AND, and OR functions to test for multiple conditions. Here, we will test if a cell value fulfills X OR Y conditions and Z CONDITION. The steps below will walk through the process.

Figure 1: Result of If Cell is “Science” or “Arts” and “A”

General Formula

= IF(AND(OR(x is True, y is True), z is True),value_if_True,value_if_False)

The TRUE Value is returned only if the X OR Y CRITERIA IS TRUE and Z IS ALSO TRUE

Formula

=IF(AND(OR(B4="Science",B4="Arts"),C4="A"),"Qualified","Unsuitable")

Setting up the Data

 

  • We will set up the data by inputting the Names of Recruits in Column A
  • The discipline of the recruits are placed in Column B
  • Their chances of been hired are placed in Column C with assigned alphabets
  • Column D is where we want the formula to return the result. Qualified signifies a TRUE value and Unsuitable is a FALSE value

Figure 2: Setting up the Data

If Cell is “Science” or “Arts” and “A”

  • We will click on Cell D4
  • We will insert the formula below into the cell
    =IF(AND(OR(B4="Science",B4="Arts"),C4="A"),"Qualified","Unsuitable")
  • We will press the enter key

Figure 3: If Cell is “Science” or “Arts” and “A”

  • We will click on Cell D4 again
  • We will double-click on the fill handle (the small plus sign at the bottom right of Cell D4) and drag down to copy the formula into the other cells

Figure 4: Result of If Cell is “Science” or “Arts” and “A”

Explanation

=IF(AND(OR(B4="Science",B4="Arts"),C4="A"),"Qualified","Unsuitable")

The OR function checks Cell B4 if it has either science or arts as its value. The AND function checks if Cell C4 has the value, “A.” The IF function returns the result as Qualified or Unsuitable if the criteria are met.

Note

  • If we chose to only leave the inverted commas and remove “Unsuitable” from the formula, we will have empty cells in the place of Unsuitable as the result.
  • If we remove the False value (UNSUITABLE) including the inverted commas, we will have FALSE in the place of Unsuitable as the result.

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc