← Level 4 – Sorter

2 / 12 ⏱ 22 minutes プレミアム

IF: the spreadsheet decides

When a grade is worse than a 2, the spreadsheet writes "practice".

A question, yes, no

The IF function can make decisions. It asks a question and, depending on the answer, writes one thing or the other.

=IF(question, if yes, if no)

An example: “Is the grade worse than 2? If yes, write practice. If no, write ok.”

=IF(B2>2,"practice","ok")

The parts of the formula

Comparing

SignMeans
>greater than
<less than
>=greater than or equal to
<=less than or equal to
=equal to
<>not equal to

The “Next step” column

  1. On the Grades sheet, type Next step in C1.

  2. In C2, type =IF(B2>2,"practice","ok").

  3. Drag C2 down to C6.

  4. Spanish (3) says practice, the others say ok.

  5. Change Math to 4. practice shows up next to Math.

⚠️

If the formula doesn’t work, check:

  • the quotation marks around the text,
  • the commas (in some countries’ settings, it’s semicolons),
  • the spelling of IF.

Pocket money

On the Money sheet, type Status in F1, and =IF(D2<0,"minus","fine") in F2. Drag it down to F8. You can see right away when you were in the minus.

あなたの番 💪

  1. Grades has a Next step column.
  2. Money has a column that watches for minus days.
  3. When you change a number, the word changes.
✅

Done when: the spreadsheet writes words based on the numbers by itself.

What to take away from this lesson