Excel IF Function Generator

Perform logical tests and return different values based on whether a condition is TRUE or FALSE.

The condition to evaluate (e.g., A1 > 10, B2 = "Yes").
You may also enter some other function(s) here. E.g. AND(OR(D3="Hello",D3="World"),E3==40)
The value to return if the condition is TRUE (optional).
The value to return if the condition is FALSE (optional).
Generated Formula:

Examples of IF Function

Scenario Formula Result
Check if a number is greater than 50 =IF(40>50, "Pass", "Fail") Pass
Check if a cell is empty =IF(A1="", "Empty", "Not Empty") If A1 is blank, Result: "Empty"
Check if a number is even or odd =IF(MOD(A1,2)=0, "Even", "Odd") If A1 = 10, Result: "Even"
Check if a person is eligible to vote (age 18+) =IF(A1>=18, "Eligible", "Not Eligible") If A1 = 20, Result: "Eligible"
Check if a value is "Yes" or "No" =IF(A1="Yes", "Approved", "Rejected") If A1 = "Yes", Result: "Approved"
Check if a date is in the past, present, or future (Multiple IF functions) =IF(A1< TODAY(), "Past", IF(A1=TODAY(), "Today", "Future")) If A1 = 10-Feb-2025, Result: "Past"