Hello, I would like to create an excel formula with IF, AND and OR conditions. Until now I didn't use OR, so I used the nested condition and it looked like =IF(A2>5,IF(B2>5,"OK","NOT OK"),"NOT OK").

Now I am not sure how to include OR condition into the formula above. Do you know how to do it ?

Now I am not sure how to include OR condition into the formula above. Do you know how to do it ?

Hi,

To create the formula, you have to combine IF, AND and OR functions. The following formula is more simple and will give the same result as the one you are using:

=IF(AND(A2>5,B2>5),"OK","NOT OK")

In case of more conditions, it is needed only to add values into AND function. For example:

=IF(AND(A2>5,B2>5,C2>5,D2>5),"OK","NOT OK")

To add OR condition,**you need to include OR function inside AND function**. The formula could look like:

=IF(AND(A2>2,OR(B2>5,C2>5)),"OK","NOT OK")

The results will be:

You can also include AND function inside OR function when needed.

To create the formula, you have to combine IF, AND and OR functions. The following formula is more simple and will give the same result as the one you are using:

=IF(AND(A2>5,B2>5),"OK","NOT OK")

In case of more conditions, it is needed only to add values into AND function. For example:

=IF(AND(A2>5,B2>5,C2>5,D2>5),"OK","NOT OK")

To add OR condition,

=IF(AND(A2>2,OR(B2>5,C2>5)),"OK","NOT OK")

The results will be:

You can also include AND function inside OR function when needed.

Related questions

## How to add side by side rows in excel pivot table ?

## Remove or hide bottom navigation bar with buttons on Android

## Are there 12 or 16 tenses in English grammar ? What are they ?

## Free email accounts with large or unlimited storage capacity

## Man Month calculation - how many man days or man hours ?

## Is CSV excel file Comma or Semicolon separated / delimited ?

## Is PLS LCD display good ? Difference between PLS LCD and Amoled

## Is more polite Could you or Would you ? What is the difference ?

## Difference between Standard and Vivid screen mode on Android

Trending questions

Meaning of Default, Preset, Fallback, Callback, Rollback value - difference Samsung Galaxy A & F better than M series ? What's the difference ? Is PLS LCD display good ? Difference between PLS LCD and Amoled Man Month calculation - how many man days or man hours ? How to calculate inverse currency exchange rate ? Remove or hide bottom navigation bar with buttons on Android How to add side by side rows in excel pivot table ? Is correct On the meeting, In the meeting or At the meeting ? How to change Checkbox to Toggle slider button using CSS ?

Meaning of Default, Preset, Fallback, Callback, Rollback value - difference Samsung Galaxy A & F better than M series ? What's the difference ? Is PLS LCD display good ? Difference between PLS LCD and Amoled Man Month calculation - how many man days or man hours ? How to calculate inverse currency exchange rate ? Remove or hide bottom navigation bar with buttons on Android How to add side by side rows in excel pivot table ? Is correct On the meeting, In the meeting or At the meeting ? How to change Checkbox to Toggle slider button using CSS ?

2023 AnswerTabsTermsContact us