Ask Your Question

Hi! Is there a function "Sort or filter by color" in Libreoffice Calc? If not, is there a hack to filter cell by color? Thanks

asked 2017-11-01 14:43:45 +0100

ndaty gravatar image

Libreoffice Ubuntu 16.04 LTS

edit retag flag offensive close merge delete


This is not a good title. Please change it so that it summarizes the question. Then provide more details in the question body. Is this cell background color or text color, and are styles involved? Also, give an example of how the colors should be sorted. What colors come first?

Jim K gravatar imageJim K ( 2017-11-01 15:08:20 +0100 )edit

The question seems clear enough to me. Excel has had this for some time now...after setting up auto-data filters to column tops, on pulling down any of those column-heading menus, one will see an obvious "sort by color..." option that's not in the same place in Calc, if it exists anywhere. It lets the user filter cells by color, of course, which is a great visual method I use for tagging rows I want to follow up on. I'll keep looking.

Dave S gravatar imageDave S ( 2018-03-21 04:49:30 +0100 )edit

@Dave S: Why don't you open a new question and add a link to this one? First, take a look at guidelines for asking. Recognize that many of us do not use Excel, so be sure to explain exactly what is needed.

Jim K gravatar imageJim K ( 2018-03-21 18:23:37 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-06-01 15:10:31 +0100

hjek gravatar image

updated 2018-06-01 15:12:50 +0100

Cell formatting, such as font and colour, should only change the presentation of a cell, not its underlying value. Imagine if calculations involving cell values (such as sorting) could depend on formatting: Changing the font (or any part of the formatting) of a cell in some spreadsheet could actually break a calculation if a particular formula depended on certain values being in Comic Sans size 5 with orange background with a cell width of 0.1.

I am somewhat frightened that a question like this is even asked (and asked often), as that would mean that if this functionality was available, people would indeed use it. You can get the colour of a cell using macros, but please don't.

Instead of embedding information within the formatting, you should store it as a separate value. For example, if you have a column called fruit where one cell has the value apple, and you want to record that the apple is green, then do not just apply a green colour to the text apple. Instead create a colour column where the cell on the same row as apple has the value green.

edit flag offensive delete link more


I basically do that when I create spreadsheets (having extra columns for sorting), but I regularly receive files from MS-Office users who tell me "just sort by the color" and it is tiresome explaining every time that my tool cannot do that. They are not trying to annoy me, they just use their tool the way they always do.

Please allow me to quote somebody else: [..] the answer to "Train has overturned, people are trapped" is not "Train is designed to be operated in an upright fashion". Highlighting names by background color is a natural way for people to work.


w2016 gravatar imagew2016 ( 2019-04-05 13:05:55 +0100 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-11-01 14:43:45 +0100

Seen: 4,390 times

Last updated: Jun 01 '18