IF() (without compound statements) MCQs Quiz | Class 9
This is a multiple-choice quiz for Class: IX, Subject: Computer Applications (Code 165), based on Unit 3: Office Tools (Spreadsheets). This quiz focuses on the topic: IF() (without compound statements) MCQs Quiz | Class 9, covering single-condition logical tests and their outputs. Submit the quiz to see your score and download a PDF of your answers.
Understanding the IF() Function in Spreadsheets
The IF() function is one of the most fundamental and powerful functions in spreadsheet applications like Microsoft Excel or LibreOffice Calc. It allows you to perform a logical comparison between values and return one result if the comparison is true, and another if it’s false. It’s the primary way to introduce decision-making into your spreadsheets.
Core Concepts of the IF() Function
The syntax for the IF function is simple and consists of three parts (arguments):
=IF(logical_test, value_if_true, value_if_false)
- logical_test: This is the condition that you want to check. It is an expression that evaluates to either TRUE or FALSE. For example,
A1 > 50orB2 = "Pass". - value_if_true: This is the value that the function will return if the logical_test is TRUE. This can be a number, text (enclosed in double quotes), or another formula.
- value_if_false: This is the value that the function will return if the logical_test is FALSE. Similar to the true value, it can be a number, text, or another formula.
Common Comparison Operators
The logical test is built using comparison operators. Here are the most common ones:
| Operator | Meaning | Example |
|---|---|---|
| = | Equal to | A1 = 100 |
| > | Greater than | A1 > 50 |
| < | Less than | A1 < 25 |
| >= | Greater than or equal to | A1 >= 33 |
| <= | Less than or equal to | A1 <= 100 |
| <> | Not equal to | A1 <> "Absent" |
Practical Examples
Example 1: Student Grades
Imagine you have a student’s score in cell A2. The passing mark is 33. You want to display “Pass” or “Fail” in cell B2.
The formula in B2 would be: =IF(A2 >= 33, "Pass", "Fail")
- If A2 contains 75, the logical test (75 >= 33) is TRUE, so the function returns “Pass”.
- If A2 contains 20, the logical test (20 >= 33) is FALSE, so the function returns “Fail”.
Example 2: Sales Bonus
An employee gets a bonus of 500 if their sales in cell C5 are greater than 10000, otherwise they get 0.
The formula in D5 would be: =IF(C5 > 10000, 500, 0)
- If C5 is 12000, the condition is TRUE, and the result is 500.
- If C5 is 9500, the condition is FALSE, and the result is 0.
Quick Revision Points
- The IF function always has three arguments separated by commas.
- The first argument must be a condition that results in TRUE or FALSE.
- Text values used as outputs (like “Pass” or “Fail”) must always be enclosed in double quotation marks.
- Numeric values do not need quotation marks.
- The IF function is essential for creating dynamic and intelligent spreadsheets.
Extra Practice Questions
- Question: In a spreadsheet, cell B5 contains the value 45. What will be the output of the formula
=IF(B5 < 50, "Below Target", "Met Target")? - Question: Which part of the formula
=IF(C1="Yes", 1, 0)is the ‘value_if_false’? - Question: A user wants to check if the value in cell D10 is exactly “Shipped”. What is the correct logical test?
- Question: The formula
=IF(E2 >= 18, "Adult", "Minor")is in cell F2. If cell E2 contains 18, what will be displayed in F2? - Question: What is the primary purpose of the IF function?
Answers: 1. “Below Target”, 2. 0, 3. D10 = "Shipped", 4. “Adult”, 5. To perform a conditional test and return different values based on the outcome.