How to change background colors (multiple cells) in a row, conditionally?

Have a spreadsheet already built out for our home budget/bill pay/credit card management/profit-savings.
Currently utilizes 196 rows and columns through “T”.

We would like to be able to have a row change color in 5 consecutive cells IF a single-cell condition is met.
We would like to be able to set this up for 5 different conditions (a different color for each condition).

So, for example, when the reference cell has a “D” entered, then that cell, along with 4 other consecutive cells in that row will change background color.

Is this even possible?

We see how to change one cell conditionally, but can’t see how have the other 4 cells in the same row change at the same time (triggered by the condition, that we set up in one cell, being met).

Hello,

you need to define a condition for the consecutive cells as well, which means you need to adapt the range to which the condition should be applied to accordingly.

  • Note the absolute addressing using $ in formula ($A1="D") which assures the condition being the same for all cells in a row (for the defined range).
  • Note the range, which assures the condition to be applied to 5 consecuticve cell.
  • Setting range to e.g. A1:E196 will highlight each row which has a D in column A according style ValueD (the row number doesn’t have an absolute addressing; see $A1 vs. $A$1)


Here is my test file: [ConditionConsecutiveCells.ods|attachment](upload://pciH7nm1plf0j4oUWsPHscsIyib.ods)
Hope that helps

yes Yes YES!!! You are a Spreadsheet Warrior come to our rescue. It took me a while to decipher your linguistic approach – I just don’t speak Exactitude to that exactitude – but that IS the WAY.

Anyway, thank you very much.

Sorry for my poor English.

If the answers works for you, please consider to click the check mark (:heavy_check_mark:) next to the answer. Thanks in advance …

LOL didn’t consider it poor English at all! Thought it was coding-speak. Thanks for the head’s up about the CheckMark – done and done.