-2

Conditional formatting a cell is simple enough. It's also simple enough to conditionally format a single cell based on another single cell. What I'm not sure about is doing it for many cells in such a way that I don't have to format each individual cell. For example:

Suppose the cells in column A either have a string, or are blank. How can I set conditional formatting on the cells in column B, such that the formatting is only applied if the A column cell on the same row (ie, the adjacent cell) is blank?

So far, I've been working around this issue by wrapping the formulas of the cells in B with IF(ISBLANK(A1),0,"FORMULA"), then applying conditional formatting to the B cells based on whether the cell values equal 0. Is there a better solution than this?

hiigaran
  • 285
  • 1
  • 10

3 Answers3

1

Yes, in my opinion. For LibreOffice Calc select ColumnB, Format > Conditional Formatting..., choose Formula is and enter:

A1=""

then a style of your choice and OK.

You might want to reduce the upper limit of Cell Range.

pnuts
  • 58,317
  • 11
  • 87
  • 139
  • It looks like a step in the right direction. Applying it to my sheet, setting the condition on a range of cells in column T, based on what's in column S, it's not formatting as hoped. Tried with A1 and S1, just in case. No idea what S1 is doing, but if I use A1, it formats based on the A column, and one row up. I know it uses relative cell addressing, but I haven't been able to figure it out thus far. – hiigaran Jun 01 '19 at 03:24
  • 1
    Okay, I just tried something else. If I set the formula to $S1="" as per the example in my previous comment, nothing seems to work, until I delete the formula. So it seems like empty quotes don't work when a cell has a formula. The cells in S are either numbers, or NA(), but $S1=NA() doesn't work. – hiigaran Jun 01 '19 at 04:04
0

Apply the condition to Column B:

enter image description here

And use the following formula:

=NOT(ISBLANK($A1))

This will result in something like this:

enter image description here

cybernetic.nomad
  • 6,100
  • 3
  • 18
  • 31
-1
=NOT(ISBLANK(OFFSET($A$1, ROW()-1, 0, 1, 1)))
Vishal
  • 2,097
  • 6
  • 27
  • 45