Help with INDEX and MATCH or it it something else

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
Office Version
  1. 2010
Platform
  1. Windows
Hi:

INDEX and MATCH is not returning required value in column D. Could you help me please?


Excel 2010
ABCDE
1Sheet1
2NameTypeNo soldTL SalesExpected value
3AlpinePears1215,000.0015,000.00
4AlpineApples1015,000.00-
5BataApples2412,000.0012,000.00
6BataOranges5212,000.00-
7CatnipPears455,000.005,000.00
8CatnipOnions625,000.00-
9
10
11
12Sheet2
13NamesSales
14Alpine15,000.00
15Bata12,000.00
16Catnip5,000.00
Sheet1 (2)
Cell Formulas
RangeFormula
D3=INDEX($B$14:$B$16,MATCH(A3,$A$14:$A$16,0))
D4=INDEX($B$14:$B$16,MATCH(A4,$A$14:$A$16,0))
D5=INDEX($B$14:$B$16,MATCH(A5,$A$14:$A$16,0))
D6=INDEX($B$14:$B$16,MATCH(A6,$A$14:$A$16,0))
D7=INDEX($B$14:$B$16,MATCH(A7,$A$14:$A$16,0))
D8=INDEX($B$14:$B$16,MATCH(A8,$A$14:$A$16,0))


Thanks

Regards,

Sean
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
How about


Excel 2013/2016
ABCD
1NameTypeNo soldTL Sales
2AlpinePears1215,000.00
3AlpineApples10
4BataApples2412,000.00
5BataOranges52
6CatnipPears455,000.00
7CatnipOnions62
8
9
10
11Sheet2
12NamesTypeSales
13AlpinePears15,000.00
14BataApples12,000.00
15CatnipPears5,000.00
Sheet2
Cell Formulas
RangeFormula
D2{=IFERROR(INDEX($C$12:$C$15,MATCH(A2&"|"&B2,$A$12:$A$15&"|"&$B$12:$B$15,0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Too late.
 
Last edited:
Upvote 0
Hi:

Thank you very much.

Could you give a solution that does not require Ctrl+Shift+Enter?



Regards,

Sean
 
Upvote 0
How about
=IFERROR(INDEX($C$12:$C$15,MATCH(1,INDEX((A2=$A$12:$A$15)*(B2=$B$12:$B$15),0),0)),"")
 
Upvote 0
How about
=IFERROR(INDEX($C$12:$C$15,MATCH(1,INDEX((A2=$A$12:$A$15)*(B2=$B$12:$B$15),0),0)),"")


Hi:

I don't need to refer to data in column B, (B2=$B$12:$B$15) so I changed formula to:

=IFERROR(INDEX($C$13:$C$16,MATCH(1,INDEX((A3=$A$13:$A$16),0),0)),"") but formula is returning ""

Could you fix please?

Regards,

Sean
 
Last edited:
Upvote 0
If you don't refer to the data in col B, you will end up with the same results your formula produced.
 
Upvote 0
Hi:

I am confused. Here is my sample worksheet and the required expected values.




Excel 2010
ABCDEF
1Sheet1
2NameTypeTypeNo soldTL SalesExpected value
3AlpinePearsPears12 15,000.00
4AlpineApplesApples10 -
5BataApplesApples24 12,000.00
6BataOrangesOranges52 -
7CatnipPearsPears45 5,000.00
8CatnipOnionsOnions62 -
9
10
11
12Sheet2
13NamesSales
14Alpine15,000.00
15Bata12,000.00
16Catnip5,000.00
Sheet1 (2)
Cell Formulas
RangeFormula
E3=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A3=$A$14:$A$16),0),0)),"")
E4=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A4=$A$14:$A$16),0),0)),"")
E5=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A5=$A$14:$A$16),0),0)),"")
E6=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A6=$A$14:$A$16),0),0)),"")
E7=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A7=$A$14:$A$16),0),0)),"")
E8=IFERROR(INDEX($B$14:$B$16,MATCH(1,INDEX((A8=$A$14:$A$16),0),0)),"")
 
Last edited:
Upvote 0
How can the formula be expected to know that Alpine & Pears is 15,000, but that Alpine & Apples is nothing?
 
Upvote 0
Hi,

Perhaps you mean you want to "Group" the results where you only want the result to display for the first instance of the Name?

If not, please answer Fluff's question above.


Book1
ABCDE
1Sheet1
2NameTypeNo soldTL SalesExpected value
3AlpinePears1215,000.0015,000.00
4AlpineApples1015,000.00
5BataApples2412,000.0012,000.00
6BataOranges5212,000.00
7CatnipPears455,000.005,000.00
8CatnipOnions625,000.00
9
10
11
12Sheet2
13NamesSales
14Alpine15,000.00
15Bata12,000.00
16Catnip5,000.00
Sheet646
Cell Formulas
RangeFormula
E3=IF(COUNTIF(A$3:A3,A3)=1,INDEX(B$14:B$16,MATCH(A3,A$14:A$16,0)),"")


Change/adjust cell references/range, add sheet name, as needed, formula copied down.
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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