# How to find out the duplicate number and show it in a new cell?

1. ## How to find out the duplicate number and show it in a new cell?

1.jpg
I have a row with four number A1 is 1, B1 is 26, C1 is 102 and D1 is 26. How can I find out the duplicate number 26 and show it in a new cell? Also I want to find out the cell which is greater then 100 and combine with the duplicate number shown as 26,102 in F1.

2. ## Re: How to find out the duplicate number and show it in a new cell?

Put this formula in F1:

=LOOKUP(2, 1/(COUNTIF(A1:D1,A1:D1)>1), A1:D1) & "," & LOOKUP(2, 1/(A1:D1>100), A1:D1)

3. ## Re: How to find out the duplicate number and show it in a new cell?

Thanks for your help. It works perfectly. Can you explain why do you put 2 and 1 over countif? Thanks again.

4. ## Re: How to find out the duplicate number and show it in a new cell?

It's a "trick" formula, you can use the Evaluate Formula function to watch it unfold, it may become clearer what it is doing as you watch.

The LOOKUP function has a "fuzzy" built into it. So if you search for the number 2 and don't find it, the formula will spot the last instance of the next lower number.

The second parameter is creating an array of answers TRUE/FALSE answers. 1/TRUE = 1, 1/FALSE = Error.

This gives you an array like {Error, 1, Error, 1}. Now the LOOKUP is looking for 2, can't find it, so settled for the last "1" in that array, so position 4. Then is uses the last parameter and pulls the value from 4th position of that array.

5. ## Re: How to find out the duplicate number and show it in a new cell?

That's a brilliant idea. So lookup(1.. also works in this case.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1