SORT
Unsupported (not recognized)Category: Lookup and reference · Last tested 2026-07-04
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel | Yes | Not yet | n/a |
| Google Sheets | Yes | Not yet | n/a |
| LibreOffice Calc | No | Yes (24.2.7.2, 2026-07-04) | Unsupported (not recognized) |
Discovered quirks
- =SORT(A1:A5) on LibreOffice Calc returned #NAME?, but the documented/expected result is {1, 1, 3, 4, 5}. MISMATCH vs expected: value mismatch: expected 1, got '#NAME?'
- =SORT(A1:A5,1,-1) on LibreOffice Calc returned #NAME?, but the documented/expected result is {5, 4, 3, 1, 1}. MISMATCH vs expected: value mismatch: expected 5, got '#NAME?'
- =SORT(A1:B3,2,1) on LibreOffice Calc returned #NAME?, but the documented/expected result is {{y, 10}, {z, 20}, {x, 30}}. MISMATCH vs expected: value mismatch: expected 'y', got '#NAME?'
- =SORT(A1:A1) on LibreOffice Calc returned #NAME?, but the documented/expected result is 0. Blank cell sorts as 0 in numeric context; no error expected; MISMATCH vs expected: expected 0, got '#NAME?'
Executed test cases
LibreOffice Calc 24.2.7.2 (tested 2026-07-04)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SORT(A1:A5) | Default sort_index=1, ascending | {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?} | {1, 1, 3, 4, 5} | Mismatch |
| =SORT(A1:A5,1,-1) | Explicit descending sort order | {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?} | {5, 4, 3, 1, 1} | Mismatch |
| =SORT(A1:B3,2,1) | 2D range sorted by its second column ascending | {#NAME?, #NAME?, #NAME?, #NAME?, #NAME?, #NAME?} | {{y, 10}, {z, 20}, {x, 30}} | Mismatch |
| =SORT(A1:A1) | Sorting a single blank cell (degenerate case) | #NAME? | 0 Blank cell sorts as 0 in numeric context; no error expected |
Mismatch |
Docs & syntax
- Excel: official documentation
- Google Sheets: official documentation