Bird
Raised Fist0
Excelspreadsheet~20 mins

IF function in Excel - 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"
B15
C"High"
D"Low"
Attempts:
2 left
💡 Hint
Think about the first condition and then the second inside the nested IF.
❓ Function Choice
intermediate
2:00remaining
Choosing 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&gt;50, "Pass", "Fail")
B=IF(B2&gt;=50, "Pass", "Fail")
C=IF(B2&lt;50, "Fail", "Pass")
D=IF(B2=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 function
What is the result of =IF(AND(C1>0, C1<=100), "Valid", "Invalid") if C1 contains -5?
AFALSE
B"Valid"
CTRUE
D"Invalid"
Attempts:
2 left
💡 Hint
AND requires all conditions to be true.
🎯 Scenario
advanced
2:00remaining
Using IF to calculate bonus
You want to calculate a bonus in cell D2: if sales in C2 are above 1000, bonus is 10% of sales, otherwise 0. Which formula should you use?
A=IF(C2&gt;1000, 0, C2*0.1)
B=IF(C2&gt;=1000, C2*0.1, 0)
C=IF(C2&gt;1000, C2*0.1, 0)
D=IF(C2&lt;1000, C2*0.1, 0)
Attempts:
2 left
💡 Hint
Bonus applies only if sales are strictly greater than 1000.
❓ data_analysis
expert
3:00remaining
Count how many cells meet IF condition
You have a list of numbers in cells A1:A10. Which formula counts how many numbers are greater than 50 using IF inside SUM?
A=SUM(IF(A1:A10&gt;50, 1, 0))
B=SUM(IF(A1:A10&gt;50))
C=SUM(A1:A10&gt;50)
D=COUNTIF(A1:A10, ">50")
Attempts:
2 left
💡 Hint
IF returns arrays; SUM adds them up.

Practice

(1/5)
1. What does the Excel formula =IF(A1>10, "Yes", "No") do?
easy
A. It checks if the value in A1 is greater than 10 and returns "Yes" if true, otherwise "No".
B. It adds 10 to the value in A1 and returns "Yes" or "No".
C. It always returns "Yes" regardless of A1's value.
D. It checks if A1 equals 10 and returns "Yes" or "No".

Solution

  1. Step 1: Understand the IF function structure

    The IF function checks a condition first, here if A1>10.
  2. Step 2: Determine the output based on the condition

    If the condition is true, it returns "Yes"; if false, it returns "No".
  3. Final Answer:

    It checks if the value in A1 is greater than 10 and returns "Yes" if true, otherwise "No". -> Option A
  4. Quick Check:

    IF(condition, true_result, false_result) = It checks if the value in A1 is greater than 10 and returns "Yes" if true, otherwise "No". [OK]
Hint: Remember: IF(condition, value_if_true, value_if_false) [OK]
Common Mistakes:
  • Confusing the order of true and false results
  • Thinking IF adds or changes values
  • Assuming it always returns true result
2. Which of the following is the correct syntax for the IF function in Excel?
easy
A. =IF(condition; value_if_true; value_if_false)
B. =IF(condition value_if_true value_if_false)
C. =IF condition, value_if_true, value_if_false
D. =IF(condition, value_if_true, value_if_false)

Solution

  1. Step 1: Recall Excel formula syntax

    Excel formulas use commas to separate arguments, not semicolons or spaces.
  2. Step 2: Identify the correct syntax

    The correct syntax is =IF(condition, value_if_true, value_if_false).
  3. Final Answer:

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

    Arguments separated by commas = =IF(condition, value_if_true, value_if_false) [OK]
Hint: Use commas to separate IF arguments, not semicolons or spaces [OK]
Common Mistakes:
  • Using semicolons instead of commas
  • Omitting parentheses
  • Not separating arguments properly
3. Given the formula =IF(B2<50, "Fail", "Pass") and the value in B2 is 45, what will be the result?
medium
A. Fail
B. Pass
C. 45
D. Error

Solution

  1. Step 1: Evaluate the condition B2<50 with B2=45

    Since 45 is less than 50, the condition is true.
  2. Step 2: Determine the IF function output

    Because the condition is true, the formula returns "Fail".
  3. Final Answer:

    Fail -> Option A
  4. Quick Check:

    Condition true returns first value = Fail [OK]
Hint: Check condition result first, then pick true or false output [OK]
Common Mistakes:
  • Choosing the false result instead of true
  • Returning the cell value instead of text
  • Confusing less than and greater than
4. Identify the error in this formula: =IF(A1>100 "High" "Low")
medium
A. Wrong comparison operator
B. Missing commas between arguments
C. Extra parentheses
D. Incorrect use of quotes

Solution

  1. Step 1: Check the IF function argument separators

    The formula lacks commas between the condition and the true/false results.
  2. Step 2: Correct the formula syntax

    It should be =IF(A1>100, "High", "Low") with commas separating arguments.
  3. Final Answer:

    Missing commas between arguments -> Option B
  4. Quick Check:

    Arguments must be comma-separated = Missing commas between arguments [OK]
Hint: Always separate IF arguments with commas [OK]
Common Mistakes:
  • Forgetting commas between arguments
  • Using semicolons or spaces instead
  • Misplacing quotes around text
5. You want to assign a grade based on score in cell C3: "A" if score is 90 or above, "B" if 80 to 89, and "F" otherwise. Which formula correctly uses nested IF functions?
hard
A. =IF(C3>90, "A", IF(C3>80, "B", "F"))
B. =IF(C3>=90, "A", IF(C3>=70, "B", "F"))
C. =IF(C3>=90, "A", IF(C3>=80, "B", "F"))
D. =IF(C3>=90, "A", IF(C3>80, "B", "F"))

Solution

  1. Step 1: Understand the grading rules

    Score 90 or above = "A", 80 to 89 = "B", below 80 = "F".
  2. Step 2: Check nested IF logic and conditions

    =IF(C3>=90, "A", IF(C3>=80, "B", "F")) correctly checks if C3≥90 for "A", else if C3≥80 for "B", else "F".
  3. Final Answer:

    =IF(C3>=90, "A", IF(C3>=80, "B", "F")) -> Option C
  4. Quick Check:

    Nested IF with correct ranges = =IF(C3>=90, "A", IF(C3>=80, "B", "F")) [OK]
Hint: Use nested IFs with descending conditions for ranges [OK]
Common Mistakes:
  • Using > instead of ≥ causing wrong grade boundaries
  • Incorrect second condition range
  • Missing nested IF structure
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