Match Formula, Find next duplicate

D3allamerican07

Board Regular
Joined
Jul 22, 2015
Messages
101
I have two groups of data I am trying working with. In each group, there is a column with a unique value. I am trying to match those values together and then sort so I get a 1-to-1 match on rows.

Unfortunately, there are duplicates, so when applying the formula, =IF(COUNTIF(H:H,Q2)>1,"Duplicate",MATCH(Q2,H:H,)), I cannot sort properly.

Q2 = Lookup Value
H:H = Range

Is there a way I can either before, during, or after applying the formula:
  1. Find the matching row number
  2. If there is a duplicate, find the first matching row number
  3. then the second matching row number
  4. then the third,
  5. etc.

Thank you in advance!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi Bill,
what you could do is a formula like:
=COUNTIF(H$1:H2,Q2) and drag that down (notice the $). You'll basically get a number for every row, showing how many times that value has occured in that row or above. That should help you getting to the n-th value.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top