•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
Why does `"">0` evaluate to TRUE?
I was noticing some funny business with conditional formatting, and traced it back to the fact that Excel thinks an empty string is greater than 0.
Naturally, my next thought is "How much bigger is "" than 0?", expecting some floating point error around zero or something, but `0-""` throws a #VALUE! error.
It's not comparing the lengths of the strings, either, because
"bar">"foo"=FALSE
"bar"<"foo"=TRUE
Is it comparing the binary representations of these strings as numbers or something? This seems weird!!!
[link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#Excel compatibility
#Excel alternatives for data analysis
#Excel alternatives
#rows.com
#business intelligence tools
#row zero
#financial modeling with spreadsheets
#Excel
#conditional formatting
#empty string
#string comparison
#> 0
##VALUE! error
#floating point error
#weird behavior
#binary representation
#greater than
#less than
#length comparison
#data type