Conditional Formatting

S

Sherry N.

Hello,
I have a worksheet where I need the cells in Column C to turn yellow if the
cell in Column B is less than a cell in Column G. I used this formula for the
conditional formatting in C2 =IF($B$2<$G$128,1,0) and it does work. However I
need the whole column to have the same conditional formatting when I paste
formats it just pastes the exact same formula. I want the next one to be
=If($B3<$G128,1,0). Is there a way I can paste formats that would use step
value or would I have to do the condtional formatting for each cell?
 
P

Pete_UK

Highlight all the cells in column C that you want this to apply to, with C2
being the first cell in this range. Click on Format | Conditional
Formatting, select Formula Is in the first panel, and enter this formula in
the next panel:

=$B2<$G$128

Click on the Format button then select the Patterns tab to change the
background colour to yellow, then OK your way out.

Hope this helps.

Pete
 
S

Sherry N.

Thanks so much works great. How can I add another condition that would make
the blank cells have no formatting? Thanks again.
 
P

Pete_UK

Hightlight all the cells again and amend the formula like this:

=AND($C2<>"",$B2<$G$128)

Hope this helps.

Pete
 
S

Sherry N.

PERFECT! Thanks again!
--
Sherry N.


Pete_UK said:
Hightlight all the cells again and amend the formula like this:

=AND($C2<>"",$B2<$G$128)

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top