β˜…0 XP

Question 1 of 10

IF statements in Excel evaluate a condition and return one value if the condition is true and another value if the condition is false:
=IF(condition, value_if_true, value_if_false)

Type the following IF statement that returns the word "Rich" if the value in cell B3 is greater than $100,000 and otherwise returns "poor".
=IF(B3>100000, "Rich", "Poor")
Remember that in Excel, text goes inside quotation marks, but numbers do not.
ABCD
1Name:Tom
2Age:49
3Money:$108,155
4Status:
5
B4fx

No key for < or > on your keyboard? Use these:

0streak
0 XP today
All Lessons

IF Function - Free Excel Practice Online

IF returns one value when a test is true and another when it is false. This exercise starts by reading =IF(B3>100000, "Rich", "Poor") and then has you write your own for everyday rules: how many scoops of food a dog gets depending on its weight, how many vaccinations by age, and what a movie theater charges at 65 and over.

After each formula you predict what it returns for a given row, such as =IF(B3>30, 2, 1) or =IF(B5>=65, 8, 12). Checking your own formula against a specific row is how you catch the classic mistake of using > when the rule means >=.

What you'll practice in this IF Function lesson

  1. IF statements in Excel evaluate a condition and return one value if the condition is true and another value if the condition is false:=IF(condition, value_if_true, value_if_false)Type the following IF statement that returns the word "Rich" if the value in cell B3 is greater than $100,000 and otherwise returns "poor".=IF(B3>100000, "Rich", "Poor")Remember that in Excel, text goes inside quotation marks, but numbers do not.
  2. What would the formula =IF(B3>100000, "Rich", "Poor") return?In other words, what is the result of the formula?
  3. Each dog gets 2 scoops of food if it weighs greater than 30 lbs, and otherwise gets 1 scoop of food.Write an IF statement that returns the number of scoops Lilly gets. - Lilly weighs 8, and 8 is not more than 30, so the test is FALSE and IF returns the otherwise value: 1 scoop.
  4. What would =IF(B3>30, 2, 1) return?
  5. If a dog's age is greater than or equal to 10, it gets 2 vaccinations, otherwise it gets 3.Write an IF statement to determine the number of vaccinations Fluffy gets. - Fluffy is 4, and 4 is not 10 or more, so the test is FALSE and IF returns the otherwise value: 3 vaccinations. Spot, at 12, would get 2.
  6. What would =IF(B2>=12, 2, 3) return?
  7. A movie theater charges $12 per ticket, but charges $8 for anyone age 65+.Write an IF statement to determine the price of Susan's ticket. - Susan is 35, which is under 65, so the test is FALSE and IF returns the otherwise price: $12.
  8. What would =IF(B5>=65, 8, 12) return?
  9. What would =IF(B5>65, 8, 12) return?
  10. What would =IF(B4>=65, 8, 12) return?

IF Function practice - FAQ

How do I practice IF Function in Excel?

Open this free LogicExcel exercise and work through 10 interactive steps. You type the real formula into a live spreadsheet grid and get instant feedback on whether it is correct, plus an explanation - no Excel install and no signup needed.

Is the IF Function exercise free?

Yes. Every LogicExcel exercise is 100% free with no account required. Your progress saves automatically in your browser.

What will I learn in this IF Function lesson?

This lesson covers IF Function as part of the Logical Functions track. You practice the syntax step by step until it becomes muscle memory you can use at work.

When does an IF result need quotation marks?

Text results such as "Rich" go in quotation marks, numbers do not. This lesson shows both: the first formula returns text, while the dog food and ticket price formulas return plain numbers.