LoveByPDF logo

LoveByPDF

EN

Conditions · IF (nested), AND, OR

Nested IF and IF with AND / OR in Excel

Put an IF inside another IF to test several levels (High / Medium / Low), and use AND / OR to test several conditions at once.

=IF(test1, value1, IF(test2, value2, value3))   =IF(AND(test1, test2), yes, no)
Write it for my sheet

Examples

Type this in the Formula StudioFormula
“if D2 > 50000 then High, if D2 > 30000 then Medium else Low”=IF(D2>50000,"High",IF(D2>30000,"Medium","Low"))
“if D2 > 30000 and E2 > 15000 then Yes else No”=IF(AND(D2>30000,E2>15000),"Yes","No")

Tips

  • Excel 365 also has IFS, which reads more easily for many levels.

People also search for

  • nested if formula in excel
  • if formula with multiple conditions
  • if and formula in excel
  • if or formula in excel
  • multiple if conditions in excel
  • ifs formula in excel
  • nested if for grades in excel
  • if formula with 3 conditions
  • if and or together in excel
  • nested if in excel in hindi

FAQ

How do I write an IF with 3 outcomes?

Nest one IF inside another: =IF(D2>50000,"High",IF(D2>30000,"Medium","Low")). Test the largest threshold first.

What is the difference between AND and OR inside IF?

AND returns TRUE only if all conditions are true; OR if any one is. Example: =IF(AND(D2>30000,E2>15000),"Yes","No").

Can LoveByPDF write this formula for me?

Yes. Open your Excel file in the Excel Agent's Formula Studio, click a cell and type what you need - e.g. "if D2 > 50000 then High, if D2 > 30000 then Medium else Low" - you get the formula, a preview on your sheet and an explanation, then insert it.

Related formulas