Vlookup to find Exact Match

AminShailja

New Member
Joined
Dec 2, 2019
Messages
11
Office Version
  1. 2010
Platform
  1. Windows
  2. Web
Hello I am trying to run vlookup on one workbook (dest.xlsm) row A1:A, from another workbook (Source.xlsm) row A1:A

Lets say, and ID( AA101) in Dest file has multiple findings in source file. Now I need only those records which has "Exceeded" in the adjacent row.
Please help me with this.

I have used vlookup through VBA Macros for this. but the result only fetches first row of every ID.

Anyone please can help me sort this out?

1576057261681.png



1576057276668.png
 

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
Hi

Write your macro to Filter the data by ID, and Filter by Exceeded.
That will give you range of cells which match your criteria for you deal with as you wish.
 
Upvote 0
in Dest!D1 put the ID you are looking for, e.g. AA101
in Dest!E1
=IFERROR(INDEX(Source!$B$2:$B$9,AGGREGATE(15,6,ROW(Source!$A$1:$A$9)/((Source!$A$2:$D$9=VLOOKUP(D$1,Dest!A$2:B$6,2,0))),ROWS(A$1:A1))-(1-1),1),"")
and copy down the column
 
Upvote 0
Hi

Write your macro to Filter the data by ID, and Filter by Exceeded.
That will give you range of cells which match your criteria for you deal with as you wish.
Yes I will try this one. But what if there are two entries of the same ID with same status as EXCEEDED?
 
Upvote 0
You will get a list of all of the rows which have that ID and which contain the value Exceeded.
I thought that was what you were trying to achieve.
You don't say what you want to do with this information, but having determined through the VBA filter what that range is, you can then do whatever you wish with that information.
 
Upvote 0
Ah yep, that doesnt work, difficult to test from photos
Try this

in Dest!D1 put the ID you are looking for, e.g. AA101
in Dest!E1
=IFERROR(INDEX(Source!$A$2:$A$9,AGGREGATE(15,6,ROW($D$2:$D$9)/((Source!$B$2:$B$9=VLOOKUP(D$1,Dest!A$2:B$6,2,0))),ROWS(A$1:A1))-(1-1),1),"")
and copy down the column
 
Upvote 0
Ah yep, that doesnt work, difficult to test from photos
Try this

in Dest!D1 put the ID you are looking for, e.g. AA101
in Dest!E1
=IFERROR(INDEX(Source!$A$2:$A$9,AGGREGATE(15,6,ROW($D$2:$D$9)/((Source!$B$2:$B$9=VLOOKUP(D$1,Dest!A$2:B$6,2,0))),ROWS(A$1:A1))-(1-1),1),"")
and copy down the column
It returns 0 somehow for every row
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,692
Members
449,117
Latest member
Aaagu

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