Forum Discussion

JakeZz's avatar
JakeZz
Copper Contributor
Jan 17, 2025

Why " =TRUE>1" is TRUE

In Excel, I enter the expression "=TRUE > 1" and the result is TRUE, I don't know why? There seem to be some rules, but I can't find any documentation

4 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    What is the use case for this?

     

    I looks like Excel is converting the data type from logical to text before doing the comparison.

    Try N(TRUE)>1.

     

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Texts and Booleans are always "more than" any number. Something like

    =--TRUE > 1
    =1*TRUE > 1

    will return false.

    • JakeZz's avatar
      JakeZz
      Copper Contributor

      Thank you for your answer first,
      You are correct that Boolean and text are always greater than numbers
      If Boolean is compared to text, whether Boolean is always larger than text, I have found this to be the case in use
      thank you

Resources