Calc: change whole row's background color matching specific strings

Apart from using Notepad++ to mark and then delete the rows from CSV file matching a string, Calc could be used by changing the background color of the whole row where a specific column’s cells match strings. Possible ?

For example: a cell in column B contains string foo bar and every matching row’s background should be colored the same.

… Calc could be used by changing the background color of the whole row where a specific column’s cells match strings…

Why not? If you want to set a style or a BckColour known in advance, you may use the STYLE() function under a condition for cells containing a formula or(/and) conditional formatting in general.

… For example: a cell in column B contains string foo bar and every {?} matching row’s background should be colored the same…

There is no Calc function (afaik) to return the cell style name (or in specific information about the background colour) of a cell. Therefore you canot use the STYLE() function or conditional formatting setting the same … for other cells. You will have to go into programming for this purpose - and you will have to read about accessing cell properties (and additionally style properties?). All the disadvantages of using macros for free!

How comes Notepad++ into the game?

Editing (with regard to comments from 2014-12-21 by @rautamiekka )

I already suggested to use conditional formatting for the task. How I would do it in detail you can find in the attached example: ask43887HighlightMatchingRows001.ods

[PS In the few cases I had to use Notepad++ on an ods, I had first to close it and extract the content.xml.]

Uh, you seem to completely misunderstand me. I mean that if, for example, B1 has the string foo bar, some way that row’s and every single other row’s background color changed to something so I’ll see which rows haven’t been checked or “marked” yet. I never said Calc can’t be used. Notepad++ can be used to mark the matching row, but how I’d use background color to mark the rows in Calc. That’s it.

Obviously I still don’t understand. This concerning (still) Notepad++. With regard to the formatting an example showing what you want to achieve might help. And: Background colour is a cell style property and it can be applied conditionally.

I just said how I can do similar task in Notepad++.

There’s a string, foo bar in this case, that possibly is in more cells in B column. If that string matches the whole cell, make the whole row’s background a different color.