• Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us
Uncategorized

Excel’s IF Function – Examples and Usage

0 Comments

Excel’s IF Function – Examples and Usage. If you need to conditionally set a cell’s value when analyzing data in Excel, the IF function is an excellent tool to use. The syntax is as follows: IF(logical_test, [value_if_true], [value_if_false]), where:

– logical_test is an expression that evaluates to TRUE or FALSE,
– value_if_true is an optional argument that specifies the result when the logical_test is true, and
– value_if_false is an optional argument that specifies the result when the logical_test is false.

Examples of IF Statements

To gain a better understanding of how the IF function operates, let’s explore some examples.

Example 1

Suppose you have a list of students and their exam scores, as shown below:

Excel's IF Function - Examples and Usage

Excel’s IF Function – Examples and Usage

You want to mark each student as either “passing” or “failing” based on their exam score. You can use an IF function to verify if their score is above or below the passing grade. A passing grade is 60, so a score less than 60 indicates failure, while a score greater than or equal to 60 indicates success.
You can implement this in Excel with IF(B2<60, “failed”, “passed”), as shown below.

Excel's IF Function - Examples and Usage

Excel’s IF Function – Examples and Usage

You can then fill this formula in all cells in the column to obtain the following result:

Excel's IF Function - Examples and Usage

Excel’s IF Function – Examples and Usage

Conditional formatting was employed to highlight the distinctions between the two results.

Example 2

For more complex logic, you may also nest IF statements. Refer to this article to learn more about how to accomplish this. Consider this instance in the medical industry. We have a patient’s blood test results and their sex-specific normal range values. Let’s use an IF statement to determine if the blood test results fall inside or outside the normal range:

Excel's IF Function - Examples and Usage

Excel’s IF Function – Examples and Usage

To check the test result for male and female patients, we need to consider their respective normal ranges. We begin by verifying the patient’s sex by checking if $H$1=”male” (we use the $ symbol to fix this cell when copying and pasting the formula to other cells). Next, we use a nested IF statement to compare the test result against the corresponding normal range.

If the patient is male, we use the formula IF(OR(J2<C2, J2>D2), “ABNORMAL”, “normal”). On the other hand, if the patient is female, we use the formula IF(OR(J2<C3, J2>D3), “ABNORMAL”, “normal”). The OR function evaluates to true if at least one argument is true, and false if all arguments are false. In this context, we use it to check if the test result is outside the normal range (i.e., if it is less than the lower limit or greater than the upper limit). If the test result is outside the range, we return “ABNORMAL”, and if it is within the range, we return “normal”.

To combine these formulas, we use the following expression: =IF(H$1=”male”, IF(OR(J2<C2, J2>D2), “ABNORMAL”, “normal”), IF(OR(J2<C3, J2>D3), “ABNORMAL”, “normal”)).

For the white blood cell count and platelet count, there is no difference in the normal ranges between male and female patients, so the formula is simpler: =IF(OR(J8<C8, J8>D8), “ABNORMAL”, “normal”).

IF Function 5Example 3

In this third example, let’s consider what a group of salespeople where able to sell in a certain period.

IF Function 6
In this group, if they where able to sell more then the average they get a bonus. So let’s check each of their gains against the average with this formula:
=IF(B2>B$10, “BONUS!”, “nope”)

IF Function 7
It seems that four of them will get a bonus for this period!
Conclusion
If you need to analyse data, then the IF statement in Excel is pretty useful.
We have seen it here in action through three different examples, but what you can do with it is only limited by your creativity. Have fun!

Let’s consider an example of a group of salespeople and their sales in a specific period. If they sell more than the average, they get a bonus. We can use the IF statement to check each person’s sales against the average and determine whether they are eligible for a bonus. The formula is as follows: =IF(B2>B$10, “BONUS!”, “nope”). In this case, it appears that four of them will receive a bonus for this period.

In conclusion, the IF statement in Excel is a powerful tool for data analysis. We have demonstrated its usefulness through three different examples, but the possibilities are endless. So, get creative and have fun exploring what you can do with it!

Rate this post
30
273 Views
What distinguishes a row from a column in Excel?PrevWhat distinguishes a row from a column in Excel?April 14, 2023
5 Ways To Add Leading Zeros To Numbers In ExcelApril 14, 20235 Ways To Add Leading Zeros To Numbers In ExcelNext

Leave a Reply Cancel reply

You must be logged in to post a comment.

Buy Windows 11 Professional MS Products CD Key
Buy Office 2021 Professional Plus Key Global For 5 PC
Top rated products
  • Avast Ultimate Suite 2021 1 Year 10 Devices Global Avast Ultimate Suite 2021 1 Year 10 Devices Global
    Rated 5.00 out of 5
    $54.00
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
  • Avast Premium Security 2021 10 Devices 2 Years Global Avast Premium Security 2021 10 Devices 2 Years Global
    Rated 5.00 out of 5
    $41.00
  • Kaspersky Small Office Security 15 PCs + 15 Mobiles + 2 Servers 1 Year Kaspersky Small Office Security 15 PCs + 15 Mobiles + 2 Servers 1 Year
    Rated 5.00 out of 5
    $201.00
  • Buy Windows 11 Professional MS Products CD Key Buy Windows 11 Professional MS Products CD Key
    Rated 5.00 out of 5
    $6.00
Products
  • Windows Server 2016 Remote Desktop Services 50 USER Connections Key Global Windows Server 2016 Remote Desktop Services 50 USER Connections Key Global
    Rated 4.74 out of 5
    $15.00
  • Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account
    Rated 4.71 out of 5
    $99.00
  • Kaspersky Total Security 2021 1 year 1 device key Global Kaspersky Total Security 2021 1 year 1 device key Global
    Rated 5.00 out of 5
    $27.00
  • Microsoft Visio 2016 professional CD Key Global Microsoft Visio 2016 professional CD Key Global
    Rated 4.94 out of 5
    $28.50
  • Microsoft Visio Professional 2021 Key 1PC Microsoft Visio Professional 2021 Key 1PC $13.00
  • Windows Server 2016 Essentials Key Global Windows Server 2016 Essentials Key Global
    Rated 4.79 out of 5
    $10.00
  • Windows Server 2019 Standard Key Global Windows Server 2019 Standard Key Global
    Rated 4.68 out of 5
    $7.00
  • Office 2024 Home and Student Office 2024 Home and Student $88.00
  • Buy Windows Server 2016 Essentials Key Global Buy Windows Server 2016 Essentials Key Global
    Rated 4.75 out of 5
    $10.00
  • Trend Micro Maximum Security 3 Devices 1 Year key Global Trend Micro Maximum Security 3 Devices 1 Year key Global
    Rated 5.00 out of 5
    $15.00
Product categories
  • Anti Virus
  • Microsoft Office
  • Microsoft Project
  • Microsoft Visio
  • Microsoft Visual
  • Microsoft Windows
  • Other Software
  • Uncategorized

Buffcom.net always brings the best digital products and services to you. Specializing in Office Software and online marketing services

BIG SALE 50% IN MAY

Microsoft Office
Microsoft Windows
Anti-Virus
Contact Us

Visit Us:

125 Division St, New York, NY 10002, USA

Mail Us:

buffcom.net@gmail.com

TERMS & CONDITIONS | PAYMENT GUIDE  | SHIPPING POLICY  | REFUND POLICY

Copyright © 2019 buffcom.net  All Rights Reserved.