Bird
Raised Fist0
Google Sheetsspreadsheet~20 mins

IF function in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
IF Function Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
Output of nested IF formula
What is the output of the formula =IF(A1>10, IF(A1<20, "Medium", "High"), "Low") when cell A1 contains the value 15?
A"Medium"
B"Low"
C"High"
D15
Attempts:
2 left
💡 Hint
Think about the first IF condition and then the nested IF inside it.
❓ Function Choice
intermediate
2:00remaining
Choose the correct IF formula for grading
You want to assign grades based on scores in cell B2: "Pass" if score is 50 or more, otherwise "Fail". Which formula correctly does this?
A=IF(B2=50, "Pass", "Fail")
B=IF(B2&gt;50, "Pass", "Fail")
C=IF(B2&lt;50, "Fail", "Pass")
D=IF(B2&gt;=50, "Pass", "Fail")
Attempts:
2 left
💡 Hint
Remember the condition includes scores equal to 50.
📊 Formula Result
advanced
2:00remaining
Result of IF with AND condition
Given the formula =IF(AND(A1>0, B1<5), "Yes", "No"), what is the result if A1=3 and B1=7?
A"No"
B"Yes"
CTRUE
DFALSE
Attempts:
2 left
💡 Hint
Both conditions inside AND must be true for the IF to return "Yes".
🎯 Scenario
advanced
2:00remaining
Using IF to categorize sales
You have sales amounts in cell C2. You want to categorize sales as "Low" if less than 100, "Medium" if between 100 and 500 (inclusive), and "High" if above 500. Which formula correctly categorizes the sales?
A=IF(C2&lt;100, "Low", IF(C2&gt;=100, IF(C2&lt;=500, "Medium", "High"), "High"))
B=IF(C2&lt;100, "Low", IF(C2&gt;=100, IF(C2&gt;500, "High", "Medium"), "Medium"))
C=IF(C2&lt;100, "Low", IF(C2&lt;=500, "Medium", "High"))
D=IF(C2&lt;100, "Low", IF(C2&gt;=100, IF(C2&lt;=500, "Medium", "High")))
Attempts:
2 left
💡 Hint
Think about the order of conditions and how IF evaluates them.
❓ data_analysis
expert
2:00remaining
Count how many cells meet IF condition
You have a list of numbers in cells A1:A10. You want to count how many numbers are greater than 50 using an IF formula inside another function. Which formula gives the correct count?
A=COUNTIF(A1:A10, ">50")
B=SUM(IF(A1:A10&gt;50, 1, 0))
C=IF(SUM(A1:A10&gt;50), COUNT(A1:A10), 0)
D=SUMPRODUCT(IF(A1:A10&gt;50, 1))
Attempts:
2 left
💡 Hint
Think about how IF returns arrays and how SUM can add them up.

Practice

(1/5)
1. What does the IF function do in Google Sheets?
easy
A. It sorts data alphabetically.
B. It checks a condition and returns one value if true, another if false.
C. It adds two numbers together.
D. It counts the number of cells with numbers.

Solution

  1. Step 1: Understand the purpose of IF function

    The IF function tests a condition and chooses between two results based on that test.
  2. Step 2: Match the description to the options

    It checks a condition and returns one value if true, another if false. correctly describes this behavior, while others describe different functions.
  3. Final Answer:

    It checks a condition and returns one value if true, another if false. -> Option B
  4. Quick Check:

    IF function = condition check [OK]
Hint: IF chooses between two results based on a condition [OK]
Common Mistakes:
  • Thinking IF adds or counts values
  • Confusing IF with sorting functions
  • Ignoring the true/false result structure
2. Which of these is the correct syntax for the IF function in Google Sheets?
easy
A. =IF(value_if_true, condition, value_if_false)
B. =IF(condition; value_if_false; value_if_true)
C. =IF(condition, value_if_true, value_if_false)
D. =IF(condition value_if_true value_if_false)

Solution

  1. Step 1: Recall the IF function syntax

    The correct order is: condition, value if true, value if false, separated by commas.
  2. Step 2: Compare options to syntax

    =IF(condition, value_if_true, value_if_false) matches the correct syntax exactly. Others have wrong order, separators, or missing commas.
  3. Final Answer:

    =IF(condition, value_if_true, value_if_false) -> Option C
  4. Quick Check:

    Syntax = condition, true, false [OK]
Hint: Remember: IF(condition, true_result, false_result) [OK]
Common Mistakes:
  • Swapping true and false results
  • Using semicolons instead of commas
  • Omitting commas between arguments
3. Given cell A1 contains 75, what is the result of =IF(A1>50, "Pass", "Fail")?
medium
A. "Pass"
B. "Fail"
C. 75
D. TRUE

Solution

  1. Step 1: Evaluate the condition A1>50

    Since A1 is 75, which is greater than 50, the condition is TRUE.
  2. Step 2: Determine the IF function output

    Because the condition is TRUE, the function returns the value_if_true, which is "Pass".
  3. Final Answer:

    "Pass" -> Option A
  4. Quick Check:

    75 > 50 = Pass [OK]
Hint: Check condition first, then pick true or false result [OK]
Common Mistakes:
  • Returning the cell value instead of the IF result
  • Confusing true and false outputs
  • Ignoring the comparison operator
4. The formula =IF(A2=100, "Yes", "No" is entered in a cell. What is wrong with it?
medium
A. Missing closing parenthesis at the end.
B. Wrong comparison operator used.
C. The true and false results are reversed.
D. The formula uses quotes incorrectly.

Solution

  1. Step 1: Check the formula syntax

    The formula is missing a closing parenthesis at the end, which is required to close the IF function.
  2. Step 2: Verify other parts of the formula

    The comparison operator (=) and the true/false results are correct, and quotes are properly used around text.
  3. Final Answer:

    Missing closing parenthesis at the end. -> Option A
  4. Quick Check:

    Syntax error = missing parenthesis [OK]
Hint: Count your parentheses to avoid syntax errors [OK]
Common Mistakes:
  • Forgetting to close parentheses
  • Mixing up = and == operators
  • Misplacing quotes around text
5. You want to mark students as "Passed" if their score in cell B2 is 60 or more, and "Failed" otherwise. Which formula correctly does this?
hard
A. =IF(B2=60, "Passed", "Failed")
B. =IF(B2>60, "Passed", "Failed")
C. =IF(B2<60, "Passed", "Failed")
D. =IF(B2>=60, "Passed", "Failed")

Solution

  1. Step 1: Understand the passing condition

    Students pass if their score is 60 or more, so the condition should be B2 >= 60.
  2. Step 2: Check each option's condition

    =IF(B2>=60, "Passed", "Failed") uses >= 60, which matches the requirement. =IF(B2>60, "Passed", "Failed") excludes 60, the one with <60 reverses pass/fail logic, and the one with =60 only passes exactly 60.
  3. Final Answer:

    =IF(B2>=60, "Passed", "Failed") -> Option D
  4. Quick Check:

    Score >= 60 = Passed [OK]
Hint: Use >= for '60 or more' condition [OK]
Common Mistakes:
  • Using > instead of >= to include 60
  • Reversing pass and fail results
  • Checking only for equality (=60)
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard