Table of Contents
The IF function in Microsoft Excel allows users to set specific conditions and perform different actions based on those conditions. This function can also be used with negative numbers by setting a condition for negative values and specifying the desired action to be performed. By including negative numbers in the IF function, users can easily manipulate and analyze data with different criteria, making it a versatile tool for data analysis and decision making.
Excel: Use IF Function with Negative Numbers
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<0, "Yes", "No")
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<0, "Yes", "No")We can then click and drag this formula down to each remaining cell in column C:

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
=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.
The following tutorials explain how to perform other common tasks in Excel:
Cite this article
stats writer (2024). How can I use the IF function in Excel with negative numbers?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-negative-numbers/
stats writer. "How can I use the IF function in Excel with negative numbers?." PSYCHOLOGICAL SCALES, 25 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-negative-numbers/.
stats writer. "How can I use the IF function in Excel with negative numbers?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-negative-numbers/.
stats writer (2024) 'How can I use the IF function in Excel with negative numbers?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-if-function-in-excel-with-negative-numbers/.
[1] stats writer, "How can I use the IF function in Excel with negative numbers?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use the IF function in Excel with negative numbers?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
