View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff Biff is offline
external usenet poster
 
Posts: 1,688
Default Return True/False to check duplicate items in a range with one

I must add one more twist to this

No more twists! <g

This seems to work.

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=MAX(FREQUENCY(IF((A1:A10)*(B1:B10="Y"),(A1:A10)*( B1:B10="Y")),(A1:A10)*(B1:B10="Y")))1

TRUE means there are dupes
FALSE means there are no dupes

Biff

"Tetsuya Oguma" wrote in message
...
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