This is by design. Search "Sort troubleshooting" to see the default sort order.
In ascending order, Microsoft Excel uses the following order.
Numbers: numbers are sorted from the smallest negative number to the largest positive number.
Alphanumeric sorting: When sorting alphanumeric text, Excel sorts from left to right, character by character. For example, if a cell contains the text βA100β, Excel places the cell after the cell containing the record βA1β and before the cell containing the record βA11β.
Text and text that includes numbers are sorted in the following order:
0 1 2 3 4 5 6 7 8 9 (space)! "# $% and () *,. /:;? @ [\] ^ _` {|} ~ + <=> ABCDEFGH I JKLMNOPQRSTUVWXYZ
Apoptops (') and hyphens (-) are ignored, with one exception: if two text lines are the same, except for a hyphen, the text with a hyphen is sorted last.
Logical values: in logical values, FALSE is placed before TRUE.
Error Values: All error values ββare equal.
Forms: spaces are always placed last.
The default sorting value matters because that's how Excel was designed to compare different types of data. Boolean values ββare always after text and numbers. Error values ββare always after that. Forms always remain last. When you use comparison operators (<, <=, =, etc.), It uses the same comparison algorithm as sorting (or, more likely, sorting alogrithm uses the code of the comparison operator, which makes them identical).
TRUE<>1 according to the sort order, but --TRUE=1 . The formula analyzer acknowledged that you are trying to deny something. If it is a boolean, it converts it to 0 or 1. There is nothing 0-ish or 1-ish relative to the boolean, it is simply the result of the Type Coercion internal function. If you type --"SomeString" , it will do the same. It sends a string to the "Type of enforcement" function, which says "Unable to force" and ends with #VALUE! in the cell.
This is the answer "Why is this so." I donβt know why they designed it like that.