SELECT all cells with same color (calc)

is there any way to SELECT (in 1 step) for example all red cells and change them to blue?

One of the reasons is that there isn’t someting like a selection of “all red cells” because there is no reliable definition of “red”. Palettes and used names for colors may change. They even may not be unambiguous in a specific version of a software if there exist different palettes originally created for different purposes, but also usable in an unplanned way.
The RGB color-space used by LibreOffice has 16777216 elements (24 bit), thousands of them roughly being “red” in somebodies eye, and about as many “blue”.
The ordinary background of the frequent questions of the kind is that sheets were badly designed misusing direct formatting as a surrogate for entering data. Cure the disease - and ask for help if needed.


if the background settings were made by Style, just change the Style.



se as definições de fundo foram feitas por Estilo, é só alterar o Estilo.

it works for me now with styles. thank you.

I first answered with a simple “no”.

As so often this can be modified. There isn’t a standard tool for the purpose - except te question actually was badly worded, and the target attribute wasn’t the color of the cell background but a cell style.

To handicraft a non-standardt tool, however, isn’t very difficult. A problem is mainly how to pass the needed information to the Sub running the user code. I spent some time to find a way that looked promising:

Select the big range (or multiple ranges) where cells of a specific color should be searched with the mouse.
Then add a single cell to the selection by Ctrl+LeftClick.
This additionally chosen cell now has the keyboard focus. It will be taken as the sample showing the .CellBackColor to search for.
Now call the Sub.

It selects all the cells within the firstly selected range(s) having exactly the same color as the sample cell.

Be aware of the fact that a difference of only one for one of the three color values (RGB) will make a color a different one though your eye will not see the difference.

See attached example. (It also contains a losely related but unused function)