I need to sort data in LibreOffice Calc using a user-defined sorting function (Small, Medium, Large, X-Large). The sort menu offers a "custom sort" option, but the sorts are all pre-defined and I do not see how to add a new one.
Disclaimer: I am completing an assignment intended for users of Microsoft Excel, but I prefer to use LibreOffice over booting up Windows.
I also need to sort cells that are formatted in a certain way, specifically cells with a red fill need to be sorted at the top of the list.
The "custom sort" lists are defined in the Options dialog.
You can add additional sort lists manually. Go to Tools->Options->LibreOffice Calc->Sort Lists and add a new list.
Sorting based on formatting is not yet supported in LibreOffice. There have been plans to add this functionality but nobody has worked on implementing the feature yet.