Vlookup when multiple same value in both columns

mayaa_mmm

Board Regular
Joined
Jul 30, 2014
Messages
54
Office Version
  1. 2010
Platform
  1. Windows
I want to vlookup with supplier and product with other file "Comparing file" which has supplier and product. if value matches and status is completed , Mark as Yes in output

SupplierProductStatusOutput
ABXY-1CompletedYes
ABXY-1CompletedYes
ABXY-2CompletedYes
BCZA-1PendingNo
ACZCCompletedYes

Vlookup with this file"Comparing file"
Supplier
ABXY-1
ABXY-1
ABXY-2
BCZA-1
ACZC
AEQA
ADZD
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How about
+Fluff.xlsm
AB
1Supplier
2ABXY-1
3ABXY-1
4ABXY-2
5BCZA-1
6ACZC
7AEQA
8ADZD
Sheet2


+Fluff.xlsm
ABCD
1SupplierProductStatusOutput
2ABXY-1CompletedYes
3ABXY-1CompletedYes
4ABXY-2CompletedYes
5BCZA-1PendingNo
6ACZCCompletedYes
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=IF(AND(C2="Completed",ISNUMBER(MATCH(A2&"|"&B2,INDEX(Sheet2!$A$2:$A$8&"|"&Sheet2!$B$2:$B$8,0),0))),"Yes","No")
 
Upvote 0
How about
+Fluff.xlsm
AB
1Supplier
2ABXY-1
3ABXY-1
4ABXY-2
5BCZA-1
6ACZC
7AEQA
8ADZD
Sheet2


+Fluff.xlsm
ABCD
1SupplierProductStatusOutput
2ABXY-1CompletedYes
3ABXY-1CompletedYes
4ABXY-2CompletedYes
5BCZA-1PendingNo
6ACZCCompletedYes
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=IF(AND(C2="Completed",ISNUMBER(MATCH(A2&"|"&B2,INDEX(Sheet2!$A$2:$A$8&"|"&Sheet2!$B$2:$B$8,0),0))),"Yes","No")
Thank you for inputs.
When i run the formula .I am getting No in column the columsn
I need in vba code . Will it be possible?
 
Last edited:
Upvote 0
Why do you need VBA?
Also it would be a good idea to state that in the beginning, to avoid members wasting their time, offering a solution you have no interest in.
 
Upvote 0
Why do you need VBA?
Also it would be a good idea to state that in the beginning, to avoid members wasting their time, offering a solution you have no interest in.
Formula is fine. No problem for me. But i m receiving No in output
 
Upvote 0
Is your data laid out as shown in my two examples?
Also have you change the sheet name to suit?
 
Upvote 0
H
Is your data laid out as shown in my two examples?
Also have you change the sheet name to suit?
thank you for your update. Yes , Updated the sheet name. Now working fine. I need one more requirement.
I need formula without Column C inputs "completed"

Only comparing Supplier and Product, output is product value in the D2
is it possible to get output


SupplierProductStatusOutput
ABXY-1CompletedXY-1
ABXY-1CompletedXY-1
ABXY-2CompletedXY-2
BCZA-1PendingZA-1
ACZCCompletedZC
Vlookup with this file"Comparing file"
Supplier
ABXY-1
ABXY-1
ABXY-2
BCZA-1
ACZC
AEQA
ADZD
 
Last edited:
Upvote 0
Ok, how about
=IFERROR(INDEX(Sheet2!$B$2:$B$8,MATCH(A2&"|"&B2,INDEX(Sheet2!$A$2:$A$8&"|"&Sheet2!$B$2:$B$8,0),0)),"")
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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