1

For example, given the sheet below:

A colourful sheet

I'd like the background colours of columns B-D to change automatically when I update the values in column A

Is that possible? I'm looking for a solution that will work with any colour, without preprogramming the sheet in some way to be aware of a fixed set of colours.

6
  • 3
  • I would say that it's a more specific case of the proposed duplicate question. I specifically want to use the other cell as a source for deciding the colour of another cell.
    – Matt
    Commented Feb 17, 2016 at 16:51
  • I don't see the difference. The referred Q&A include answers to apply conditional formatting by using a script and by using the built-in feature. Regarding the last, see webapps.stackexchange.com/a/53559/88163 Commented Feb 17, 2016 at 17:00
  • 1
    If you want to color of the conditional formatting to be pulled from the source cell, you're going to be in scripting land. Commented Feb 17, 2016 at 20:21
  • If you make that an answer (rather than a comment) I'll select it as the best answer.
    – Matt
    Commented Feb 17, 2016 at 20:24

1 Answer 1

2

Going to answer this one as the answer from the post: "Google Spreadsheets conditional formatting based on another cell's content" is outdated.

To answer your question: Highlight the Range that you need conditional formatting, then go to "Format > Conditional Formatting" and for each Color you will add a unique conditional format.

  • Apply to Range: the range you selected previously

  • Format Cells if: "custom formula"

    • Formula in plain English: Anything in the corresponding cell in column A on the same Row that contains the characters "Red", the formula would be:

      =A:A="Red" 
      
    • And then just choose red background from the color picker in the conditional formatting sidebar.

    • Repeat this process for each color.

Example file here: https://docs.google.com/spreadsheets/d/1sJtSrvFpKxmxUgzvrtIQzhYmxqeoR0FWVHpzNV5bIgQ/edit?usp=sharing

4
  • How, in your example scenario, would I go about getting the background of a row to be, say, blue?
    – Matt
    Commented Feb 17, 2016 at 20:28
  • Highlight Row, the right click > Conditional Formatting and would setup something like this: prntscr.com/a52j1w Commented Feb 18, 2016 at 22:40
  • Thanks @David Knapp. Is it possible to extend this method to colour an entire row rather than just one cell?
    – Matt
    Commented Feb 24, 2016 at 16:46
  • yes just highlight the entire row and then apply the conditional formatting rules to that row. Commented Feb 25, 2016 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.