Match excluding duplicates

fastballfreddy

Board Regular
Joined
Jan 13, 2015
Messages
57
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to match two columns of data while not matching the same value twice. the match formula just finds the first value. the below example when matching data 2 the 5 always matches the first 5 in Data 1. Is there a formula so once the first 5 is matched it will match it with the 2nd one and so on?

Data 1Data 2Match Formula
5203
2551
2051
545#N/A
1551
551
550#N/A
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
are you asking for the row location of the subsequent numbers?
if so, try this:

Book1
ABCD
1Data 1Data 2
25203
32551
42054
5545Not Found
61556
7557
8550Not Found
Sheet1
Cell Formulas
RangeFormula
D2:D8D2=IFERROR(1/(LARGE(IFERROR(1/(($A$2:$A$8=$B2)*(ROW($A$2:$A$8)-ROW($A$2)+1)),0),COUNTIF($B$2:$B2,B2))),"Not Found")
 
Upvote 0
Try:

Libro1
ABC
1Data 1Data 2
25203
32551
42054
5545Not Found
61556
7557
8550Not Found
Hoja1
Cell Formulas
RangeFormula
C2:C8C2=IFERROR(SMALL(IF($A$2:$A$8=B2,ROW($A$2:$A$8)),COUNTIF($B$2:B2,B2))-ROW($B$2)+ROW($B$2)-1,"Not Found")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
In C2 copied down.
Excel Formula:
=IFERROR(AGGREGATE(15,6,ROW($A$2:$A$8)/($A$2:$A$8=$B2),COUNTIF($B$2:$B2,$B2))-ROW($A$1),"")
Data 1Data 2FORMULAMatch Formula
5​
20​
3
3​
25​
5​
1
1​
20​
5​
4
1​
5​
45​
#N/A​
15​
5​
6
1​
5​
5​
7
1​
5​
50​
#N/A​
 
Upvote 0
Thanks for all of the answers! I tried Dante's and it works great! Thanks again for everyone's responses and help!
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,105
Members
449,096
Latest member
provoking

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