# Find duplicate values in column A based on values in Column C

I have an Excel workbook that I need to see if the vlaues in Column A  are duplicates of values in COlumn C.  That is, if A15 is also in Column C, make A15 red with pink text.  I know this would be an array formula in Excel 2010, but not sure how.

Sandra
###### Who is Participating?

ConsultantCommented:
Yes, check the conditional formatting rule. The Rule Type must be "Use a formula to determine which cells to format" and the formula:

=COUNTIF(\$B\$2:\$B\$100,\$A2)>0

Kevin
0

ConsultantCommented:
Conditional formatting can be used to highlight all rows which contain duplicate values in one or more columns. Four scenarios are presented below with solutions. All scenarios require that all cells in the table be selected. In Excel 2003 and earlier, choose the menu command Format->Conditional Formatting and select the "Formula Is" option. In Excel 2007 and later, navigate to the Home tab, select Conditional Formatting->New Rule, and select the Rule Type "Use a formula to determine which cells to format". The following examples assumes the data starts in row 2 and extends to a maximum of row 100.

=COUNTIF(\$C\$2:\$C\$100,\$A2)>0

Kevin
0

Author Commented:
I don't get it.  I want coulmn A to change its format color if its value is in column B, why would I use column C?
0

ConsultantCommented:
Because you said "Find duplicate values in column A based on values in Column C"

:-)

Use this formula for column B:

=COUNTIF(\$B\$2:\$B\$100,\$A2)>0

Kevin
0

Author Commented:
I did, BUT instead of comparing to unique values, it simply color anything number that matched.  That is, if I have 51 in the first column, but 5 or 182 in the second, it colors the 51 red!  It is not matching to the values in the second column, it is matching to ANY value in the second column.
0

Author Commented:
Sorry, my typo mistake on the columns.
0

ConsultantCommented:
Can you post an example if it's still not working?

Kevin
0

Author Commented:
51      5
215      2
2182      6
182      182
215      215

Simple example, but it highlights the 51, 2182 and 182 in red in teh first column.  Which, what I want, would be the 182 and 215 in the first column to be highlighted.  could it be backward?

Sandra
0

Author Commented:
Yes, used that Rule Tpe, but still does not format the cells correctly.
0

Author Commented:
thank you, got it to work!
0

ConsultantCommented:
See attached.

Kevin
Conditional-Formatting.xlsx
0

Author Commented:
One thing, it only works on small numbers, when I used our 9 digit account numbers, it does not format.  Oh, well, it does work, up to a point.
0

ConsultantCommented:
It will work with nine digit numbers. But the values in column A have to be formatted the same as those in column B.

Kevin
0

Author Commented:
Nope.  Both are formatting the same, but it still only works with small numbers.  I am going to try to create a function that will do this.  So, am posting another question regarding building a function.

Sandra
0

ConsultantCommented:
I just tried with nine digit numbers formatted as numbers, text, and with a leading apostrophe. All worked.

Kevin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.