FREE LESSON 5 OF 47 · EXCEL AND GOOGLE SHEETS

Excel IF function practice

IF lets a formula make a decision: check a condition, then return one answer when it is true and another when it is false. Practice it below on an order list, with specific feedback when the answers are swapped or the text is missing its quotes.

Loading spreadsheet controls…

LESSON 5 · IF

Making decisions with IF

IF(test, value if true, value if false) checks a condition and returns one of two answers. Text answers go in quotes.

=IF(C2>=20,"Bulk","Single")

Identical everywhere. LibreOffice may use ; between arguments depending on your language settings; this practice grid accepts both.

Step 1 of 3 In D2, show "Bulk" if the quantity in C2 is 20 or more, otherwise "Single".

D2fx
Swipe to see more columns.
ABCDEFGH
1
2
3
4
5
6
7
8
9
10
Use arrow keys to move between cells and Enter to select a cell. While writing a formula, select a cell to insert its address or type the address in the formula bar.

How it works

The pattern is =IF(test, value if true, value if false). The test is any comparison that is either true or false.

Comparisons use = (equal), <> (not equal), > and < (greater and less than), and >= and <= (or equal). “20 or more” is >=20.

Text answers go inside straight double quotes: "Bulk". Numbers and cell references do not: =IF(C2>=20,B2*0.9,B2).

The true answer always comes first. Read the formula aloud as “if C2 is at least 20, then Bulk, otherwise Single”.

Pattern=IF(C2>=20,"Bulk","Single")

Worked example

Quantities are in column C. An order of 20 units or more is labeled Bulk.

FormulaResultWhy
=IF(C2>=20,"Bulk","Single")SingleThe notebook order is 12 units.
=IF(C3>=20,"Bulk","Single")BulkThe pen order is 40 units.
=IF(C5>=20,"Bulk","Single")SingleThe folder order is 16 units.

Common mistakes and how to fix them

Excel, Google Sheets and LibreOffice Calc

IF works identically in Microsoft Excel and Google Sheets. In LibreOffice Calc it is the same function, but depending on your language settings the separator between arguments may be ; instead of , (the practice grid accepts both).

Keep going

Next free lesson: Excel COUNTIF practice

More free spreadsheet lessons

Where the Pro lessons go next

Learn Pro continues through lookups, conditional totals, text and date functions, charts and pivot tables, with capstone workbooks at the end. The same hands-on style covers Word and Google Docs, PowerPoint and Google Slides and AI skills for work.