Coloring Cell Blocks

T

Troy

Is there a function that searches a range for a value < 19
and if a value is found then color that cell block gray?
 
P

Paul

Troy said:
Is there a function that searches a range for a value < 19
and if a value is found then color that cell block gray?

Not sure what you mean by "cell block".
You should look at Conditional Formatting (on the Format menu).
You would need a formula such as
=(OR($A$1<19,$B$1<19,$A$2<19,$B$2<19))
which would look for a value less than 19 in the range A1:B2.
 
T

Troy

-----Original Message-----


Not sure what you mean by "cell block".
You should look at Conditional Formatting (on the Format menu).
You would need a formula such as
=(OR($A$1<19,$B$1<19,$A$2<19,$B$2<19))
which would look for a value less than 19 in the range A1:B2.


.
What I am looking for is if B7 is < 19 then color the
following cells in gray A7, B7, C7, D7, E7, F7, G7, and H7.
 
P

Paul

Troy said:
What I am looking for is if B7 is < 19 then color the
following cells in gray A7, B7, C7, D7, E7, F7, G7, and H7.

Select A7:H7.
Format > Conditional formatting
Change first box to "Formula Is".
In second box type this formula:
=($B$7<19)
Click the "Format" button and choose your grey formatting.
Click two "OK" buttons to get out, and the job is done.

It is important to have an absolute reference ($B$7, rather than B7) in this
situation, so that all 8 of your cells base their conditional formatting on
the same cell.
 
D

David McRitchie

meant
Select Columns B:H as the *columns* to be colored.

David McRitchie said:
and if you really mean the for all rows , not just row 7, then
Select Columns B:H as the rows to be colored

Then with cell B1 as the active cell. The formula is based
on the active cell.

=IF($B1<19)

More information on Conditional Formatting on
http://www.mvps.org/dmcritchie/excel/condfmt.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

Paul said:
Select A7:H7.
Format > Conditional formatting
Change first box to "Formula Is".
In second box type this formula:
=($B$7<19)
Click the "Format" button and choose your grey formatting.
Click two "OK" buttons to get out, and the job is done.

It is important to have an absolute reference ($B$7, rather than B7) in this
situation, so that all 8 of your cells base their conditional formatting on
the same cell.
 

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