Calc: cells excluded from sort

In the attached *.ods file, cells in column C (= seqpre) contain a header and the digits 1, 2, and 3. I need Calc to sort column C. These are the Sort Criteria:

Options:
Case sensitive ON
Enable natural sort ON

The result is that column C sorts correctly except for the last 2 cells (# 1882 and 1883). Can anybody tell me what to do to have Calc include the last 2 cells in its sort as well?
sortprob.ods (26.6 KB)

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 4; OS: macOS 12.7.6; UI render: Skia/Raster; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Ask/Guide - How to use the Ask site - The Document Foundation Wiki #More_details


no problem with
Version: 24.8.7.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:24.8.7-0ubuntu0.24.10.1
Calc: threaded
image

You somehow forgot to tell how you start sorting, which is: “I have some single cell focused in the area, when I start the dialog - i.e., I don’t select my data manually, neither A1:CC1883, nor whole columns A:C; and I rely on Calc to find the area itself, even though my cells A1882 and A1883 are empty, so the rectangular block is broken”.

I would report that problem as a bug: empty cells in the first column are OK in the middle, but not in the end, even though the other columns allow to deduce the correct rectangle.

If you already have AutoFilter enabled, why not use its own sorting?
image

If you want to use the standard sorting, then disable AutoFilter (Ctrl+Shift+L), sort the ranges (Ctrl+A) and enable AutoFilter again. If I were Calc, I would be confused too.