Vlookup with Multiple Conditions

Yugo101

New Member
Joined
Jun 12, 2017
Messages
27
Hey Everyone,

Wondering if can help.

I have 2 spreadsheets. One is customer information (Main Sheet) and other is more in depth customer info sheet (Sheet 2).

Basically i have a formula which does work but doesn't take into consideration that there could be duplicate names, at the moment it seems to only take the first name it finds and retrieves that text.

Here is my current formula - (hopefully its correct i typed it up because its form work computer.

=if(vlookup((A1,'[20212012 2nd sheet.xlsx]2nd sheet'!$C:$C,1,False)=A1,(Vlookup(A1,'[20212012 2nd sheet.xlsx]2nd sheet'!$C$2:T:658,16,False)))

Main Sheet -
A: Customer Name
b: ref ( I want to use)
2nd sheet
C: Customer Name
d: ref.

So currently it matches Name from Main sheet to 2nd sheet and retrieves certain info, but because of the duplicate names it brings the first one back for multiple results.

How can introduce another function so match name and another column so it 100% accurate in matching on 2nd sheet.

Sorry if confusing, be easier if the sheet was confidential.

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Assuming you want it to work on a closed workbook you could give this a try:-
Excel Formula:
=IF(ISERROR(LOOKUP(2,1/(('[20212012 2nd sheet.xlsx]2nd sheet'!$C$1:$C$10000=A1)*('[20212012 2nd sheet.xlsx]2nd sheet'!$D$1:$D$10000=B1)),'2[20212012 2nd sheet.xlsx]nd sheet'!$R$1:$R$10000)),
           "Not Found",
            LOOKUP(2,1/(('[20212012 2nd sheet.xlsx]2nd sheet'!$C$1:$C$10000=A1)*('[20212012 2nd sheet.xlsx]2nd sheet'!$D$1:$D$10000=B1)),'2[20212012 2nd sheet.xlsx]nd sheet'!$R$1:$R$10000))
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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