Your manager asks you to mark each employee as “Met Target” or “Below Target”. You could check each row manually, but that becomes slow and error-prone. The IF function lets Excel make the decision for every row.
What does the IF function do?
The IF function checks a condition and returns one result when the condition is true, and another result when the condition is false.
IF formula syntax
Formula structure
Example: =IF(D4>=C4,"Met Target","Below Target")
This checks whether Actual Sales is greater than or equal to Monthly Target. If yes, Excel returns “Met Target”. If no, it returns “Below Target”.
Business examples
| Scenario | Formula | Result |
|---|---|---|
| Target achieved | =IF(D4>=C4,"Met Target","Below Target") | Met Target |
| Bonus eligibility | =IF(D4>=C4,"Yes","No") | Yes |
| Attendance review | =IF(H4>=90%,"Good","Needs Review") | Good |
IF with AND and OR
Build employee performance decisions
Download one ZIP file containing the practice workbook, challenge workbook, solution workbook, formula cheat sheet, quiz and answer key.
Mini assignment
- Calculate Variance as Actual Sales minus Monthly Target.
- Use IF to return Met Target or Below Target.
- Use IF to return Bonus Eligible Yes or No.
- Use IF to review attendance.
- Use IF with AND for Final Remark.
Quick quiz
- What does IF do?
- What are the three parts of IF?
- Why do text outputs need quotation marks?
- What does AND require?
Answers: Checks condition and returns different results; logical test, true result, false result; Excel treats them as text; all conditions must be true.