Vlookup or xlookup or index match multiple columns

john62290

New Member
Joined
Dec 15, 2021
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hey all, this is driving me crazy why I can't figure out a formula to look one column or the other based on a value in a cell of another table. In the seperate table I have a list of data that says with product A or Product B. If it says product B, I want it to look up the account name that matches for product B. Say my other table has Contract B and then account name ABC, I want it to return "Reorder." Then, if the next line of data is product A account name XYC, i want the formula to return "Contract." I have an if/then statement with two vlookups but I feel like there should be something more efficient. Thanks for the help!
Account NameProduct AProduct B
XYZContract Contract
ABCNewReorder
LMNPortfolioPortfolio
QRSDeadContract
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Do you mean like this:

Book3
ABCDEFG
1Account NameProduct AProduct B
2XYZContractContractProductProduct B
3ABCNewReorderAcct NameABC
4LMNPortfolioPortfolio
5QRSDeadContractResultReorder
6
Sheet1
Cell Formulas
RangeFormula
G5G5=XLOOKUP($G$3,$A$2:$A$5,XLOOKUP(G2,$B$1:$C$1,$B$2:$C$5),"")
 
Upvote 0
Something like this?
Book2
ABCDEFG
1Account NameProduct AProduct BAccount NameProduct
2XYZContractContractXYZProduct AContract
3ABCNewReorderABCProduct BReorder
4LMNPortfolioPortfolio
5QRSDeadContract
Sheet4
Cell Formulas
RangeFormula
G2:G3G2=TOCOL(IFS(($A$2:$A$5=E2)*($B$1:$C$1=F2),$B$2:$C$5),2)
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFG
1Account NameProduct AProduct BAccount NameProduct
2XYZContractContractXYZProduct AContract
3ABCNewReorderABCProduct BReorder
4LMNPortfolioPortfolio
5QRSDeadContract
6
Data
Cell Formulas
RangeFormula
G2:G3G2=INDEX($B$2:$C$100,XMATCH(E2,$A$2:$A$100),XMATCH(F2,$B$1:$C$1))
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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