3
votes

I want to format cells in column C based on the value for column B.

For instance:

B

.75

.75

.5

.25

When column C gets a value. I want the cell color to change to represent a < = or > value, like so:

C

.75 = green

.5 = yellow

.25 = red

.25 = green

How can I do this without putting in a formula specific to each cell? There could be any number of cells.

1

1 Answers

6
votes

Start with one cell. Go to Format -> Conditional formatting. Do your three rules (if C1 greater than B1, fill green, etc.):

Select the cell you wish to edit.

Selecting the cell

Under Format -> Conditional formatting:

Conditional formatting button

The Conditional Formatting Window will open. You can select the rule you would like and add a formula as shown.

Adding the formula

After each one, there is a button at the bottom of the dialog for Add another rule. Make sure that you don't use fixed (=$B$1) references in your formulas, but relative ones (=B1). Once you have all three rules, click done. Test it to make sure it works like expected.

Now all you have to do is select the cell that has the conditional format (C1) and click the Format Painter tool. Then just highlight any cells that you want to follow the same rules. Because you have relative references, the conditional formatting will shift (i.e. C2 will reference B2 and D2 will D1 will reference C1).

Google does all the hard work :)

Does that make sense?