Search code examples
if-statementgoogle-sheetsgoogle-sheets-formulaformulaspreadsheet

Negative number in a formula for google spreadsheets


Issue with a negative number (-10%) in the formula =IF(AND($B1>-10%),2,) It works fine if the number is positive. Tried to put (-) in parenthesis, but it did not work out.

Here is the link https://docs.google.com/spreadsheets/d/1JBpX4u4tIhOf1jAQrlqXPf8smGB7gP4mmZldmm60SBQ/edit?usp=drivesdk


Solution

  • try:

    =IF(B1>-10%, 2, )
    

    so if B1 is -9% or 5% or 20% it will output 2

    if B1 will be -11% or -50% or -18% it will output empty cell due to 2nd parameter of IF being empty