On 6/1/2018 11:41 AM, Brian Barker wrote:
[...]
Yup. On the Options tab of the Sort dialogue, you will see "Range
contains column labels". If this is ticked, the top row of the block
of values (for sorting rows, or leftmost column for sorting columns)
will be teated as labels - in other words names for the columns (or
rows) of actual data - rather than part of the data themselves. In
your case, the G and the L are being treated as labels for columns B
and C. Remove the tick and you will get what you want.
Note that Calc appears to set this option intelligently - perhaps
assuming that text values - your G and L - are likely to be labels. I
find it is always necessary to check this option before clicking OK to
carry out the sort process. I suppose the proper way to do things is
first to give all your columns labels in the preceding row and then
always to include that label row in the range you sort. Calc should
make the appropriate decision to tick that option and everything will
be hunky-dory.
I trust this helps.
Brian Barker
Thanks to Russ and to you, Brian, I believe that I have learned the
lesson about the status of the Options tab's "Range contains column
la_b_els" box.
I just happen to use alpha characters within my previously pasted
example; they were not meant to be "labels" or "headers".
I have just tested what CALC does when the topmost row contains an alpha
character vs contains a numerical character.... CALC senses if the
topmost data is indeed alpha or numeric; and if numeric, the Options
tab's "Range contains column la_b_els" box is, initially, unchecked.
Therefore, I think when doing a sort routine it is not necessary to
check the status of that box if the topmost row's data is not numerical
character(s).
Of course, if/whenever I forget to check the status in the future, the
resultant sorted data is rather easy to recognize as being incorrectly
sorted. In those instances, I should then recall that the state of the
"Range contains column la_b_els" box needs to be validated.
VinceB.