Forum Discussion

Ted Verstreater's avatar
Ted Verstreater
Copper Contributor
May 05, 2018

Need help with formula that has three outcomes

I am looking for a formula that will return a value  for same, higher, or lower for to numbers that are compared to each other.  Any help would be greatly appreciated and thank you in advance.

    • Detlef_Lewin's avatar
      Detlef_Lewin
      Silver Contributor

      Haytham.

       

      couldn't download your file ("network error").

      My suggestions:

      =SWITCH(SIGN(B1-A1),-1,"lower",0,"same",1,"higher")
      =LOOKUP(2,1/COUNTIFS(A1,{">";"=";"<"}&B1),{"lower";"same";"higher"})
      =IF(B1>A1,"higher",IF(B1<A1,"lower","same"))

       

       

Resources