Forum Discussion

rennats's avatar
rennats
Copper Contributor
Dec 29, 2023

Help on IF function

Any idea on why is it returning true?

 

 

 

 

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    rennats Texts are considered greater than numbers. That's why.

     

    By the way, you can simplify the formula to:

    =A2>1000

    This will return either TRUE or FALSE. No need for the IF in this case.

     

    But since this is apparently not what you really want, can you explain what is you are expecting and why?

    • rennats's avatar
      rennats
      Copper Contributor

      Riny_van_Eekelen 

       

      Yeah sorry I was really using the IFS function, I just simplified the formula above.

      Below is the my sample IFS.

       

       

  • Something to bear in mind is that the comparison operators also apply to the alphabetical sort order of text, thus

    = IFS(
        A1>"asdz", "AFTER 'asdz'",
        A1>"asd",  "AFTER 'asd'",
        TRUE,      "BEFORE OR EQUAL TO 'asd'"
      )

    are valid as text comparisons.

Resources