Duplication of string values within a range
=IF(SUMPRODUCT(COUNTIF(A1:A7,A1:A7))=ROWS(A1:A7), "Yes","No")
Ooops! I think I have the Yes/No backwards. So, let's just change the
operator:
=IF(SUMPRODUCT(COUNTIF(A1:A7,A1:A7))ROWS(A1:A7)," Yes","No")
Yes = there are duplicates
No = there are no duplicates
--
Biff
Microsoft Excel MVP
"T. Valko" wrote in message
...
Assuming there are no empty cells within in the range:
=IF(SUMPRODUCT(COUNTIF(A1:A7,A1:A7))=ROWS(A1:A7)," Yes","No")
--
Biff
Microsoft Excel MVP
"JRD" wrote in message
...
How do I check whether the same string value appears within a range of
cells
e.g.
A
1 JD
2 DF
3 AM
4 FC
5 RS
6 DF
7 JD
How do I get excel to check down column A1:A7 to see if any of the
different
strings are repeated? In this example I want to return the answer "yes"
because JD appears in both A1 and A7. However, if this wasn't the case
then I
would want excel to return the answer "no"
I am using excel 2007
Many thanks
JD
|