VLOOKUP that matches each value only once.

Matt_in_CA

New Member
Joined
Feb 4, 2015
Messages
5
Hello,
Does anyone have a good solution, or know a function, that will deploy VLOOKUP but match each value only once?
For example, List 1 has these items: BOB, JANE, MARY, BILL, SAM.
List 2 has these items: BOB, JANE, MARY, BOB, JANE, MARY.
I want to see which items in List 2 have a match in List 1. (Exist on List 2 and also on List 1.) But, I want to match each List 2 item only once. That is, because there is only one "BOB" on List 1, you can only use "BOB" once to match with List 2.
If I use VLOOKUP, it will show a match for all the items on List 2 because they each do have a match over in List 1.
I can solve this by getting the initial result with VLOOKUP, and then working those results with ISNUMBER or MATCH to manually sort out the duplicates.
Or, I could write a VBA loop that will find each match, and then cross the matched List 1 value off the list as I match it.
But, I'm wondering if someone knows a function that might do this "exclusive" "only once" match easily.
Background: This is for reconciling cash bank statements. First step is that you find out what transactions you have at the bank that you also have in your books. Whatever is left over is the difference you have to reconcile. Problem is, if you use VLOOKUP, Excel might match it two times, thus missing transactions that have to be reconciled.
Thanks,
Matt
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
ColumnA has List1, ColumnB has List2.
C2 =COUNTIF(A:A,B2)-COUNTIF($B$1:B1,B2)
C3 =COUNTIF(A:A,B3)-COUNTIF($B$1:B2,B3)

It shows like how many cards it has. C4 shows 2, MARY has 2 cards and C5 shows 0, second-BOB does not have card any more.
hope this helps.
 
Upvote 0
Thanks Takae. I think your approach will help to show "unmatchables", that is, items that do have a match in the second list, but that match has already been used. Matt.
 
Upvote 0
It does not show "unmatchables".
First "BOB" in List2 has matched in List1(C2 shows "1") however second "BOB" in List2 does not have matched in List1(C5 shows "0") because "BOB" has already been used.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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