Index and Match (stumped)

Jek61

New Member
Joined
Jul 30, 2020
Messages
16
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Folks,

I hope someone can assist me with an issue which has stumpted me.

I have a table which consists of 4 Columns Dept A - Dept D and 5 Rows of Customers. Each department ranks the customers 1 - 5. I have a Column with the ranking 1 - 5 and a data validation cell which contains the Departments. I want to display the Customers in Rank order based on the selection in the data validation cell.

I have tried a number of index and match constructs but nothing seems to get the correct result.

I would be very grateful for any assistance.

Dept ADept BDept CDept ERankingDept A
Cust A
1​
3​
2​
1​
Cust A
Cust B
2​
1​
2​
Cust C
Cust C
2​
1​
2​
3​
Cust F
Cust D
1​
3​
Cust F
3​
3​
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
try

=INDEX($B$3:$E$7,MATCH(H3,$A$3:$A$7,0),MATCH($H$2,$B$2:$E$2,0))
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEFGH
1Dept ADept BDept CDept ERankingDept B
2Cust A1321Cust C
3Cust B212Cust B
4Cust C2123Cust A
5Cust D13
6Cust F33
7
Master
Cell Formulas
RangeFormula
H2:H4H2=INDEX(SORT(FILTER(A2:E6,FILTER(B2:E6,B1:E1=H1)<>""),MATCH(H1,A1:E1,0)),,1)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
H1List=$B$1:$E$1
 
Upvote 0
=INDEX($B$3:$E$7,MATCH(H3,$A$3:$A$7,0),MATCH($H$2,$B$2:$E$2,0))
Sorry didn't work just getting and N/A, I did change the ranges to match my sheet. For clarity Cust A is in A4.

Thanks
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDEFGH
1Dept ADept BDept CDept ERankingDept B
2Cust A1321Cust C
3Cust B212Cust B
4Cust C2123Cust A
5Cust D13
6Cust F33
7
Master
Cell Formulas
RangeFormula
H2:H4H2=INDEX(SORT(FILTER(A2:E6,FILTER(B2:E6,B1:E1=H1)<>""),MATCH(H1,A1:E1,0)),,1)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
H1List=$B$1:$E$1
Many thanks,

unfortunately I can't use the sort or filter function.
 
Upvote 0
Ok, how about
+Fluff 1.xlsm
ABCDEFGH
1Dept ADept BDept CDept ERankingDept B
2Cust A1321Cust C
3Cust B212Cust B
4Cust C2123Cust A
5Cust D13
6Cust F33
7
Master
Cell Formulas
RangeFormula
H2:H4H2=INDEX($A$2:$A$6,MATCH(G2,INDEX($B$2:$E$6,,MATCH($H$1,$B$1:$E$1,0)),0))
Cells with Data Validation
CellAllowCriteria
H1List=$B$1:$E$1
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

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