View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Conditional Formating based on many cells

Try
=(COUNTIF($A$1:$E$6,A15))=1
as the formula in the FORMULA IS option of Conditional Formatting and choose
the formatting you want

You can enter it for any cell and then paint on other cells you want to
highlight.
"basic" wrote:

I am trying to create a conditional format that will look at 30 cells and if
any one of the cells matches the current cell it should change the color of
the number.

Example: Each cell contains the following number
A B C D E
1 1 2 5 1 2
2 3 4 2 3 4
3 5 6 1 5 6
4 1 2 5 2 5
5 3 4 2 4 2
6 5 6 1 6 1


15 3

In cell A15 I would like a conditional format that would take the number in
cell A15 and check to see if it is in the area of A1..E6. If there is one
number that matches the number in A15 then I would like the number in A15 to
change to a color, if not it remains unchanged. The numbers could be spread
out throughout the spreadsheet so I would need to reference 30 specific cells
not just the range.