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

RowA: EmployeeB: ValueC: TargetD: Status
2Amit4500050000Active
3Priya6200060000Active
4Ravi3800045000Closed
5Neha5500055000Active
=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

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.