IF
LogicalbeginnerIF is Excel's core decision-making formula. It evaluates a condition and returns one result when true, another when false. You can nest multiple IFs or combine with AND/OR for complex logic. It's essential for flagging, categorizing, and building conditional calculations.
Syntax
=IF(logical_test, value_if_true, value_if_false)Parameters
logical_testThe condition to evaluate (e.g., A2 > 10000).value_if_trueWhat to return if the condition is true.value_if_false?What to return if false. Defaults to FALSE if omitted.? = optional parameter
Worked Example
You want to flag any invoice over $10,000 as 'Large' and everything else as 'Standard'.
| Row numbers | A | E |
|---|---|---|
| Header row | invoice_id | amount |
| 2 | INV-1001 | $12,500.00 |
| 3 | INV-1002 | $487.50 |
| 4 | INV-1003 | $18,750.00 |
| 5 | INV-1004 | $3,200.00 |
| 6 | INV-1005 | $7,600.00 |
| 7 | INV-1006 | $9,800.00 |
Formula
=IF(B2>10000, "Large", "Standard")Result
LargeIF checks whether the amount in B2 is greater than 10,000. Because B2 is $12,500.00, the condition is TRUE and the formula returns 'Large'.
Practice Exercises
2 exercises - work through each one using the data table below
Question
Your team wants to flag any invoice that's been sitting unpaid. Write a formula that returns 'Action Needed' if the status is 'Overdue', and 'OK' otherwise. What would the result be for invoice INV-1008?
Dataset
Showing rows 1-10
Download CSV| Row numbers | A | B | C | D |
|---|---|---|---|---|
| Header row | ||||
| 2 | INV-1001 | Cloudline Software | $12,500.00 | Paid |
| 3 | INV-1002 | Apex Office Supply | $487.50 | Paid |
| 4 | INV-1003 | Summit Consulting Group | $18,750.00 | Paid |
| 5 | INV-1004 | Meridian Travel Co. | $3,200.00 | Paid |
| 6 | INV-1005 | Forge & Frame Creative | $7,600.00 | Paid |
| 7 | INV-1006 | NovaTech Solutions | $9,800.00 | Pending |
| 8 | INV-1007 | Atlas Hardware Co. | $2,150.00 | Paid |
| 9 | INV-1008 | Clearview Data Systems | $15,300.00 | Overdue |
| 10 | INV-1009 | Redstone Marketing | $4,250.00 | Paid |
| 11 | INV-1010 | Keystone Legal Advisors | $8,900.00 | Paid |
| 12 |
Scroll to explore the table, then sort or filter by column as needed.
Hints
Your Answer
Question
Finance wants to categorize invoices by size: anything $10,000 or above is 'High Value', everything below is 'Standard'. How many of the first 10 invoices (INV-1001 through INV-1010) would be categorized as 'High Value'?
Dataset
Showing rows 1-10
Download CSV| Row numbers | A | B |
|---|---|---|
| Header row | ||
| 2 | INV-1001 | $12,500.00 |
| 3 | INV-1002 | $487.50 |
| 4 | INV-1003 | $18,750.00 |
| 5 | INV-1004 | $3,200.00 |
| 6 | INV-1005 | $7,600.00 |
| 7 | INV-1006 | $9,800.00 |
| 8 | INV-1007 | $2,150.00 |
| 9 | INV-1008 | $15,300.00 |
| 10 | INV-1009 | $4,250.00 |
| 11 | INV-1010 | $8,900.00 |
| 12 |
Scroll to explore the table, then sort or filter by column as needed.
Hints
Your Answer
Want more practice?
Test Me mode randomizes exercises across all formulas without telling you which formula to use.