Excel / 6 min read
IF Formula Examples for Excel and Google Sheets
Use IF formulas for pass/fail checks, status labels, thresholds, blanks, and nested logic in Excel and Google Sheets.
IF returns one result when a condition is true and another when it is false. It is the core building block for labels, simple decisions, and safe fallback logic.
Check this first
- Confirm the test itself is valid before nesting other logic.
- Quote text outputs like "Late" or "Ready".
- Use direct blank checks where empty cells matter.
- Keep nested IF formulas readable or switch to lookup logic when they grow too long.
Working examples
Flag invoices as Late or On time
=IF(TODAY()>B2, "Late", "On time")Leave the cell blank when there is no input
=IF(A2="", "", A2*1.2)What IF does well
IF is useful whenever a sheet needs to make a basic decision. That can mean labeling a row, applying a threshold, skipping empty input, or wrapping a calculation so it only runs when the data is present.
It also becomes easier to debug larger formulas when you separate the condition from the action.
Start simple before nesting
Many formula problems come from trying to write a large nested IF all at once. Build the first condition, confirm it works, then add another layer only if the sheet genuinely needs multiple branches.
- One rule: IF is usually enough.
- Two or three rules: nesting can still be fine.
- Many rules: consider lookup tables instead.
A practical style rule
When a formula mixes labels, dates, and math, clarity matters more than cleverness. The next person should be able to read the formula and explain what it is doing without reverse engineering every character.