Excel Formatting

New Contributor

I have number in column Y.  If they are equal to any of the numbers in column C I would like to turn them both a color.  I think my formula is only having it look at the specific row that the number is in and I want to search the whole column.  

 

Formula that I am using =IF(Y2="'C':C2:C3294",1,2)

 

Please let me know if you can help.

4 Replies

@keithd0088 

If to highlight you may use two conditional formatting rules. One with formula

=C2=$Y$2

applied to the range C2:C3294.

Another one with

=COUNTIF($C$2:$C$3294, $Y$2)

applied to Y2

 

I don't understand your formula at all. It looks like you are checking if Y2 is that string value and why return 1 or 2?
I assume this is in a custom formula in conditional formatting.
You could do it as 1 formula but I think 2 would be easier and slightly less overhead, which this type of conditional formatting will tend to be. Try:
highlight column C and add conditional formatting with custom formula:
=COUNTIF(Y:Y,C1)
Then do the same for column Y and formula:
=COUNTIF(C:C,Y1)
Thank you that did it. Sorry Excel newbie.
no problem. that is what this forum is for. If you have more question please ask. If you don't understand the solution we give, please ask.