ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   conditional formatting (https://www.excelbanter.com/excel-worksheet-functions/124058-conditional-formatting.html)

dmack

conditional formatting
 
What formula would i use to have a cell recognize (highlighted) a value in
another cell. For example:
Cell A1 is 5, A2 is 6, A3 is 7, A4 is 8 and A5 is 9. What formula would
place in Cell C12 to search for and recongnize that there is an 7 contained
in cells A1 to A5 and highlight if possible with a designated color.

thanx

Martin Fishlock

conditional formatting
 
In cell C12 select conditional formatting from the format menu

change 'Cell Value Is' to 'Formula Is' and then enter the following formula

=OR(A1=7,A2=7,A3=7,A4=7,A5=7)

then set the format to what ever you want.

Sometimes you have to edit the formula afterwards and remove the quotes.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"dmack" wrote:

What formula would i use to have a cell recognize (highlighted) a value in
another cell. For example:
Cell A1 is 5, A2 is 6, A3 is 7, A4 is 8 and A5 is 9. What formula would
place in Cell C12 to search for and recongnize that there is an 7 contained
in cells A1 to A5 and highlight if possible with a designated color.

thanx


SteveW

conditional formatting
 
Conditional Format in C12, will only control format of that cell

To get A1, A2 etc highlighted, apply a conditional format to them
ie <Cell Value is, and set value to 7 - then control the format

You could put the Array formula
=sum(if(a1:a4=7,1,0))
into C12, then using the same Condition Formula as in A1

Getting C12 to do the same is more difficult as you can't have Array
formula :)
but in C12, <Formula Is, =if(a1=7,if(a2=7,if(a3=7,if(a4=7,1,0),0),0),0)

Messy, to say the least.
Best approach is to have a helper cell to calculate the result,
then a Conditional Format for C12 based on that help cell

Steve

On Fri, 29 Dec 2006 15:17:03 -0000, dmack
wrote:

What formula would i use to have a cell recognize (highlighted) a value
in
another cell. For example:
Cell A1 is 5, A2 is 6, A3 is 7, A4 is 8 and A5 is 9. What formula would
place in Cell C12 to search for and recongnize that there is an 7
contained
in cells A1 to A5 and highlight if possible with a designated color.
thanx


daddylonglegs

conditional formatting
 
Another way, particularly useful if your range is large....

=COUNTIF(A1:A5,7)

"Martin Fishlock" wrote:

In cell C12 select conditional formatting from the format menu

change 'Cell Value Is' to 'Formula Is' and then enter the following formula

=OR(A1=7,A2=7,A3=7,A4=7,A5=7)

then set the format to what ever you want.

Sometimes you have to edit the formula afterwards and remove the quotes.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"dmack" wrote:

What formula would i use to have a cell recognize (highlighted) a value in
another cell. For example:
Cell A1 is 5, A2 is 6, A3 is 7, A4 is 8 and A5 is 9. What formula would
place in Cell C12 to search for and recongnize that there is an 7 contained
in cells A1 to A5 and highlight if possible with a designated color.

thanx



All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com