Index match function

ericlzh

New Member
Joined
Jun 24, 2019
Messages
8
Dear All,

I could like to use INDEX MATCH function to obtain a specific data that i need from Raw Data. How can i implement the formula?
Please refer to example below.
Thank you all.

Raw Data (Sheet 1):-
Master Account#Buyer AccountSeller Account
1ABCDGABCDABCD
1EFGHGEFGHEFGH
1IJKLGIJKLIJKL
1MNOPGMNOP-LMNOP-S

<colgroup><col span="3"></colgroup><tbody>
</tbody>


Formula Function to be applied (Sheet 2):-
Buyer
Account
Seller
Account
Expected Result
01ABCDGABCD
1EFGHG0EFGH
1MNOPG0MNOP-L
01MNOPGMNOP-S

<colgroup><col span="3"></colgroup><tbody>
</tbody>

<colgroup><col span="3"></colgroup><tbody>
</tbody>
 
Hi, Hopefully this would work:


Book1
ABCD
1BuyerSellerTraded productExpected Results
21ABCDG0OilABCD-1
301ABCDGMetalsABCD-2
401EFGHGOilEFGH-S
Sheet2
Cell Formulas
RangeFormula
D2{=INDEX(Sheet1!$C$3:$C$5,MATCH(IF(A2=0,B2,A2)&C2,Sheet1!$A$3:$A$5&Sheet1!$D$3:$D$5,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Try regular formula


Book1
ABCD
1BuyerSellerTraded productExpected Results
21ABCDG0OilABCD-1
301ABCDGMetalsABCD-2
401EFGHGOilEFGH-S
Sheet2
Cell Formulas
RangeFormula
D2=INDEX(Sheet1!$B$2:$C$4,SUMPRODUCT((Sheet1!$A$2:$A$4=IF(A2<>0,A2,B2))*(Sheet1!$D$2:$D$4=C2)*(ROW(Sheet1!$D$2:$D$4)))-1,IF(A2<>0,1,2))
 
Upvote 0
Hi Aryatect,

Your formula works fine but it can only applied to the Seller Leg and not the Buyer Leg.

Hence, I am applying using Dante's formula. Thx!
 
Upvote 0

Forum statistics

Threads
1,216,473
Messages
6,130,838
Members
449,597
Latest member
buikhanhsang

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