The sort function for my calc spreadsheet is not working.

Both the icon and key are shaded and inoperable. How to fix this problem?

Could you be more precise about the type of data you need to sort and can you provide steps you take to do sorting. Please update question and put these information into it.

You may have activated change tracking in the document, see menu Edit → Track Changes, if Record Changes is on (checked) then some operations are disallowed.

edit > track changes is unchecked. I can data sort but results are not what I want. Why?

Crystal ball is foggy. Don’t know your data and don’t know what you want.

Sort options are also disable with shared spreadsheets.

Because those have change tracking on.

Thanks for the tip.