If - and - vlookup

jwang776

New Member
Joined
Feb 6, 2017
Messages
6
Hi Everyone,

I have a table where I'm trying to lookup a transaction ID for a particular sales member. I'm not sure how to approach this and my efforts around an IF( AND( VLOOKUP( formula have proved futile.

The following tables show what I'm trying to accomplish.


TABLE 1
Associate (A)Transaction ID (B)
Jon Snow??? - Trying to find the transaction ID for a Dragon Sword sold by Jon Snow

<tbody>
</tbody>

AssociateTransaction IDItem ClassItem Type
Jon Snow45AWhite WalkerSword
Tyrion Lannister4234236AGiantMace
Jon Snow46347ADragonSword
Tyrion Lannister4423428ADragonTooth
Jon Snow4121239AGiantClub
Jon Snow553450AGiantBoot
Sansa Stark341231232AWhite WalkerGlove
Jon Snow534534534ADragonTooth
Sansa Stark123123AWightCloak
Sansa Stark234590789AWightSword

<tbody>
</tbody>

I was thinking IF(AND(VLOOKUP(A2,TABLE2(A1:D11),4,false)="SWORD",VLOOKUP(A2,TABLE2(A1:D11),3,false)="DRAGON"),VLOOKUP(A2,TABLE2(A1:D11),2,false),"THIS FORMULA DID NOT WORK")

This was definitely not the correct logic and any help in understanding this type of query is extremely appreciated! Thank you to everyone for reviewing!

p.s. running excel 2013

Sincerely,

Jon
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Re: Seeking Expert Help If Available, Complex IF - AND - VLOOKUP

Code:
=INDEX(B1:B11,MATCH("Jon Snow"&"Dragon"&"Sword",A1:A11&C1:C11&D1:D11,))
array formula, run with Ctrl+shift+enter
 
Upvote 0
Re: Seeking Expert Help If Available, Complex IF - AND - VLOOKUP

Code:
=INDEX(B1:B11,MATCH("Jon Snow"&"Dragon"&"Sword",A1:A11&C1:C11&D1:D11,))
array formula, run with Ctrl+shift+enter

Hi Shaowu. This is exactly what I was looking for!! Many thanks and extremely appreciated. Do you recommend a good place for learning typical array formulas? Up until now, I had not explored this topic very much and am eager to learn! Anyhow, thank you for the amazing solution.

-Jon
 
Upvote 0
Re: Seeking Expert Help If Available, Complex IF - AND - VLOOKUP

Morning, I'm located in china, I learned knowledge about excel in an excel forum, but the language is chinese. Hope you can master array formula soon, you will see a wonderful and amazing world :)
 
Upvote 0

Forum statistics

Threads
1,214,381
Messages
6,119,192
Members
448,874
Latest member
Lancelots

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