12.3 C
London
Friday, May 10, 2024
HomeSoftware TutorialsExcelExcel: How to Use IF Function with Negative Numbers

Excel: How to Use IF Function with Negative Numbers

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formulas to use an IF function with negative numbers in Excel:

Method 1: Use IF Function to Check if Cell Contains Negative Number

=IF(B2

This formula will return “Yes” if the value in cell B2 is negative (i.e. less than zero) – otherwise it will return “No.”

Method 2: Use IF Function to Check if Cell is Negative, Zero or Positive

=IF(B2=0,"Zero",IF(B2>0,"Positive", "Negative"))

This formula will return the following values:

  • “Zero” if cell B2 is equal to zero.
  • “Positive” if cell B2 is a positive value.
  • “Negative” if cell B2 is a negative value.

The following examples show how to use each formula in practice with the following dataset in Excel:

Example 1: Use IF Function to Check if Cell Contains Negative Number

We can type the following formula into cell C2 to return “Yes” if the value in cell B2 is negative or return “No” otherwise:

=IF(B2

We can then click and drag this formula down to each remaining cell in column C:

Excel IF function with negative numbers

The formula returns “Yes” for each row where the value in the Net Sales column is negative and “No” for each row where the value is positive.

Example 2: Use IF Function to Check if Cell is Negative, Zero or Positive

We can type the following formula into cell C2 to return “Zero”, “Negative” or “Positive” depending on the value in cell A2:

=IF(B2=0,"Zero",IF(B2>0,"Positive", "Negative"))

We can then click and drag this formula down to each remaining cell in column C:

The formula returns “Zero”, “Negative” or “Positive” depending on the corresponding value in column A.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

Excel: How to Use IF Function with Multiple Conditions
Excel: How to Create IF Function to Return Yes or No
Excel: How to Use an IF Function with Range of Values

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories