View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tetsuya Oguma Tetsuya Oguma is offline
external usenet poster
 
Posts: 19
Default Return True/False to check duplicate items in a range with one

Thanks for your reply.

I must add one more twist to this.

A1:A10 has the items to check duplicate and B1:B10 has "include" flags. Then
I want to consider ONLY items in Column A whose corresponding inlcude flag in
Column B is "Y"

Under the following scenario a desired formula should return FALSE, as there
is one instance of 1, 3, 6 and 7.

A B
1 1 Y
2 1
3 3 Y
4 6 Y
5 7 Y

But the formula should give TRUE under the following:

A B
1 1 Y
2 1 Y
3 3 Y
4 6 Y
5 7 Y

Can you come up with a formula?

Thanks again.

Tetsuya

"Biff" wrote:

Dang!

I'll get it right one of these times!!!!!

=IF(COUNTA(A1:A10),MAX(FREQUENCY(A1:A10,A1:A10))1 ,"")

TRUE means there are dupes
FALSE means there are no dupes

Biff

"Biff" wrote in message
...
This is more robust:

=IF(COUNTA(A1:A10),MAX(FREQUENCY(A1:A10,A1:A10))=1 ,"")

With the first formula I was assuming ALL the cells in the range would
ALWAYS have something in them.

Biff

"Biff" wrote in message
...
Try this:

=SUMPRODUCT(COUNTIF(A1:A10,A1:A10))10

FALSE = no dupes
TRUE = dupes

Biff

"Tetsuya Oguma" wrote in message
...
Hi all,

I have a range, say, A1:A10, and want to check if any duplicate entry
exists
within this range.

What is the formula that returns True/False to do that?

Simple enough?

Tetsuya Oguma