How To Do IF Statements In Excel?

Use the formula: `=IF(logical_test, value_if_true, value_if_false)`

Example: `=IF(A1>10,”Yes”,”No”)`

Use `AND` with `IF`: `=IF(AND(A1>10,B1<5),"Pass","Fail")`

Use `OR` with `IF`: `=IF(OR(A1>10,B1<5),"Pass","Fail")`

Use nested `IF` statements: `=IF(A1>90,”A”,IF(A1>80,”B”,IF(A1>70,”C”,”F”)))`

Use `IFS` for multiple conditions: `=IFS(A1>90,”A”,A1>80,”B”,A1>70,”C”,TRUE,”F”)`

Use `IFERROR` to handle errors: `=IFERROR(A1/B1,”Error”)`

Use `COUNTIF` with `IF` when needed: `=IF(COUNTIF(A:A,A1)>1,”Duplicate”,”Unique”)`

Use `IF` with text comparisons: `=IF(A1=”Done”,”Complete”,”Pending”)`

Use `IF` with blank checks: `=IF(A1=””,”Blank”,”Not Blank”)`

Suggested for You

Trending Today