Forum Discussion
Ted Verstreater
May 05, 2018Copper Contributor
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.
Haytham Amairah
May 05, 2018Silver Contributor
Hi Ted,
Please check the attached file for a similar example of what you are looking for.
Hope that helps
- Detlef_LewinMay 05, 2018Silver 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"))