How can I use the IF function in Google Sheets to work with negative numbers?

The IF function in Google Sheets allows users to perform conditional calculations and logical comparisons with negative numbers. This function can be used to specify a certain action or outcome if a cell contains a negative value, making it a useful tool for data analysis and decision making. By utilizing the IF function, users can easily manipulate negative numbers in their spreadsheets and customize their formulas based on specific criteria. This feature offers a convenient and efficient way to handle negative numbers in Google Sheets, enhancing the overall functionality and versatility of the program.

Google Sheets: Use IF Function with Negative Numbers


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

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 Google Sheets:

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:

Google Sheets 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

=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 Google Sheets:

x