Excel – Changing a row’s color depending on the value ( TEXT ) of a cell

conditional formattingmicrosoft excel

In a cell, I have the choice of YES and NO for values. I would like to know how to change the background color for other cells in the same row depending on the value of the first without changing the values in the other cells.

How can I do this?

Best Answer

No code required.

  • Select cells C15 to N15
  • click Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format
  • enter this formula


  • select a format, for example green fill and close all dialogs
  • keep the cells selected and enter another rule with the formula


  • select a format, for example a red fill and close all dialogs.

You can now copy the cells and use Paste special > Formats to copy the conditional formatting to other rows.

enter image description here