Unit 3 IF function - Part 1

The IF function in Excel allows you to perform a logical test and return one value if the test is true and another value if the test is false.

Let's break down the IF function in simpler terms:

You have a condition or question you want to ask about your data.

For example, "Is the student's score higher than 60?"

If the answer to your question is yes (TRUE), you want Excel to do one thing. For example, if the student's score is higher than 60, you want Excel to show "Pass."

If the answer to your question is no (FALSE), you want Excel to do something else. For example, if the student's score is not higher than 60, you want Excel to show "Fail."


Here's how to use the IF function:

Syntax:

=IF(logical_test, value_if_true, value_if_false)


logical_test: This is the condition you want to test. It can be a comparison, such as A1>B1 (meaning if the contents in A! is greater than the contents in B1), or any logical expression that evaluates to TRUE or FALSE.

value_if_true: This is the value that will be returned if the logical test evaluates to TRUE.

value_if_false: This is the value that will be returned if the logical test evaluates to FALSE.


Example 1: Simple IF statement

Suppose you have a cell containing a student's score in cell A1, and you want to display "Pass" if the score is greater than or equal to 60, and "Fail" otherwise.

You can use the following formula:


=IF(A1>=60, "Pass", "Fail")

This formula checks if the value in cell A1 is greater than or equal to 60.

If it is, it returns "Pass"; otherwise, it returns "Fail".

g

MIN and MAX functions with arrays in Microsoft Excel allows you to find the smallest an largest values respectively within a range of cells. A

Assignment

As an administrative assistant at a small retail store, part of your responsibilities includes managing inventory levels and placing orders for restocking items. To streamline the ordering process, you've implemented a system where items are automatically reordered when their stock levels fall below a certain threshold. However, you want to include a check to ensure that items are only reordered if they are currently in stock.

Complete using the IF function in the last column.

Click HERE to access the Dataset to complete the assignment.

Submit your answer to actira.tt@gmail.com