Index/Match Confusion

vxs

Board Regular
Joined
Dec 10, 2008
Messages
61
Hi all,
I don't know why I struggled with Index / Match so much, or whether it is the right formula for the job but can you assist please?

I have a table which I am trying to total up some of the relating values elsewhere by the persons name. Example Data

PartAmountPaid By
Oil Cap£50Tom
Exhaust£100Tom
Bumper£200George
Wing£300James
Bonnet£100George

So in the other table I have a column for each person and I wish to list the amounts they have paid.

TomGeorgeJames
£50£200£300
£100£100

Because the lookup is using the person's Name and looking Left for info I decided I couldn't use vlookup and needed to use Index/Match. But every time I use index match I just get the first result and don't then know how to move on to the 2nd, 3rd or 4th result if there is one to match and display and duplicate the formulas going down.

Can anyone advise please?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
when learning INDEX MATCH, try just doing the first part as MATCH only which will give you the ROW number, adding the INDEX later can help to understand it

as for VLOOKUP it is designed to do the First Result from a sorted list, also VLOOKUP looks at the leftmost column where INDEX/MATCH can be transposed
 
  • Like
Reactions: vxs
Upvote 0
In this case you need another function instead of Match, since it would only bring you the first match and you need to get several.

This is an option:

Dante Amor
ABCDEFGH
1PartAmountPaid ByTomGeorgeJames
2Oil Cap£50Tom£50£200£300
3Exhaust£100Tom£100£100 
4Bumper£200George   
5Wing£300James   
6Bonnet£100George   
7
Hoja4
Cell Formulas
RangeFormula
F2:H6F2=IFERROR(INDEX($B$2:$B$6,SMALL(IF($C$2:$C$6=F$1,ROW($C$2:$C$6)),ROWS(G$2:G2))-1),"")
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
  • Like
Reactions: vxs
Upvote 0
In this case you need another function instead of Match, since it would only bring you the first match and you need to get several.

This is an option:

Dante Amor
ABCDEFGH
1PartAmountPaid ByTomGeorgeJames
2Oil Cap£50Tom£50£200£300
3Exhaust£100Tom£100£100 
4Bumper£200George   
5Wing£300James   
6Bonnet£100George   
7
Hoja4
Cell Formulas
RangeFormula
F2:H6F2=IFERROR(INDEX($B$2:$B$6,SMALL(IF($C$2:$C$6=F$1,ROW($C$2:$C$6)),ROWS(G$2:G2))-1),"")
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

I will try this formula later when back on the PC, thank you for submitting a working formula to go by which is editable to suit my needs.
 
Upvote 0
Here are a couple other options depending on the version of Excel you have.
If you have Office 365 then you can just use the FILTER function as in cell A10 in the example below.
If you have Excel 2010 or later ten the formula in A15. Copy down and across. This is basically the option DanteAmor gave you, but it does not require CTL-SHIFT-ENTER, just Enter.

Book1
ABC
1PartAmountPaid By
2Oil Cap£50Tom
3Exhaust£100Tom
4Bumper£200George
5Wing£300James
6Bonnet£100George
7
8
9TomGeorgeJames
10£50£200£300
11£100£100
12
13
14TomGeorgeJames
15£50£200£300
16£100£100 
Sheet1
Cell Formulas
RangeFormula
A10:C10A10=FILTER($B$2:$B$6,$C$2:$C$6=A$9)
A15:C16A15=IFERROR(INDEX($B$2:$B$6,AGGREGATE(15,6,(ROW($B$2:$B$6)-ROW($B$2)+1)/($C$2:$C$6=A$14),ROWS($A$15:A15))),"")
 
Upvote 0

Forum statistics

Threads
1,215,844
Messages
6,127,246
Members
449,372
Latest member
charlottedv

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