How to Write If Statement in Excel?

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

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

Use `=IF(A1=”Yes”,1,0)` for text-based conditions

Use `=IF(AND(A1>10,B1<5),"Pass","Fail")` for multiple conditions

Use `=IF(OR(A1>10,B1<5),"Pass","Fail")` if any condition can be true

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

Use `=IFERROR(formula, value_if_error)` to handle errors

Use `=IFS(condition1, result1, condition2, result2, TRUE, default_result)` for multiple conditions

Use `=IF(A1=””, “Blank”, “Not Blank”)` to check empty cells

Suggested for You

Trending Today