IF Function in Excel: Syntax, Examples & Practice
Learn the Excel IF function: Returns one value when a condition is TRUE and another when FALSE. Try focused practice and download a free workbook.
Syntax
=IF(logical_test, value_if_true, value_if_false)
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Worked example
| Row | A: Employee | B: Value | C: Target | D: Status |
|---|---|---|---|---|
| 2 | Amit | 45000 | 50000 | Active |
| 3 | Priya | 62000 | 60000 | Active |
| 4 | Ravi | 38000 | 45000 | Closed |
| 5 | Neha | 55000 | 55000 | Active |
=IF(B2>=C2,"Achieved","Not Achieved")
Expected result: Not Achieved
Value and Target are numbers; Status is separate text. Statistical formulas use the four visible Value observations.
Professional use
Target status, DPD status, employee performance.
Practice IF · Download practice .xlsx
Apply your skills
- Inventory & Reorder Planning — 45–60 min; uses IF in a formula checkpoint.
Questions and answers
How can I practise IF?
Use the focused ten-question IF lab, then download its workbook for ten additional function-specific tasks and an answer key. Core learning works without an account.
Which Excel version supports IF?
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Does the browser simulator replace Microsoft Excel?
No. It supports a selected set of formula behavior for practice. Native workbook recalculation, full function compatibility, PivotTables and external data features must be checked in your own Excel installation.
Interactive practice runs in your browser.