CALC Sort not respecting frozen title row

New user. Apologize if I didn’t find this topic, if it had been addressed already. I have a spreadsheet with column titles. I have frozen the top row. When I go to sort column, it includes the titles in the sort. How can I sort by contents (with connected data columns) but leave titles ‘frozen’?

In order to make the header detection work:

  1. Column headers are one row above actual data consisting of text, no blanks, no numbers.
  2. At least one of the actual data columns should be numeric.

If precondition 2 is not fulfilled (all your data are text), create a named database range:

  1. select the entire list
  2. call menu:Data>Define… and give a range name to the list.
  3. Under “Options” check “Column headers”
  4. Click [Add] and [OK]
  5. Call Data>Sort… and your column headers will be acknowledged.

HOWEVER, if you prefer to use the toolbar buttons [A-Z] and [Z-A], the settings of the underlying database range are not acknowledged. In this case, install my little extension https://extensions.libreoffice.org/en/extensions/show/99205 which comes with a toolbar having 2 buttons calling 2 macros trying to do the right thing.

Advanced solution
LibreOffice comes with a database component. A defined database range can be sorted by means of an SQL query which can be linked to a spreadsheet area. SQL queries can return any subset of rows and columns in any order of rows and columns.

Very advanced solution
Use a true database right from the start.

When you are sorting with the toolbar (Sort Ascending/Descending symbols), every column with data needs a title (no number).
grafik

All columns do have a title.

In this example, sorting with the Ascending/Descending symbols does not work properly because the data is text:
grafik

Solution:
Add an empty column with a title.
grafik

Does that help you too? See my edited comments.

When you are sorting with the dialog, the checkbox has to be checked.

Sort with dialog? Unfamiliar with this. I just used the toolbar. Tried both ways, selecting “A” column header and a box comes up asking to extend contents. Also tried cursor in cell and toolbar, which also does not leave titles. Thanks for responding BTW. I appreciate the help.

dialog: menu Data->Sort

Sorry for my ignorance. I don’t know where ‘dialog’ is or how to use. New to this software. If you mean the Data tab and choose sort, yes, I get same result. I don’t see any checkbox.

The checkbox is “Headers: Range contains column labels”.

That seems useful. I’ll read though. First thing it says that data tab> sort, or sort icon should open the dialog/options window. Neither opens window for me.

Can you post a screenshot?

I’d rather not. This spreadsheet contains Personal info, passwords etc. How would I show a screenshot of a window not showing up?
Is there some hidden option that shows/hides those windows?

Make a new spreadsheet and see if sorting works there. Maybe install the newest LibreOffice.

You could also try this:
https://help.libreoffice.org/25.2/en-US/text/shared/01/profile_safe_mode.html?&DbPAR=CALC&System=WIN

OK, I found it. I was clicking sort ascending, not the double arrows - sort. I feel so dumb. Didn’t really see the double arrows. Anyway, am able to see the options window now, and using the header box. After doing it once, the next time it has the title shown instead of column A. Follow up. It shows sort key 2 and 3. I’m assuming it does multiple sorts in order. But which order? 3,2, then 1. or 1,2,3?

Why don’t you try?
.
And please report a bug on design flaws, if the column named first is used as third one.