Index & Match to return a number

NilsYan

New Member
Joined
Jan 9, 2017
Messages
15
Dear all,

I would like to use Index Match function to return e.g. "6", whenever the "Column" equals 3, and the "row" equals a number between 40 and 59. How can I do this

Thank you

[TABLE="width: 384"]
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64, align: center"] [/TD]
[TD="class: xl64, width: 64, align: center"]80-100[/TD]
[TD="class: xl64, width: 64, align: center"]60-79[/TD]
[TD="class: xl64, width: 64, align: center"]40-59[/TD]
[TD="class: xl64, width: 64, align: center"]20-39[/TD]
[TD="class: xl65, width: 64, align: center"]0-19[/TD]
[/TR]
[TR]
[TD="class: xl66, align: center"]3[/TD]
[TD="class: xl67, align: center"]4[/TD]
[TD="class: xl67, align: center"]5[/TD]
[TD="class: xl67, align: center"]6[/TD]
[TD="class: xl67, align: center"]7[/TD]
[TD="class: xl68, align: center"]8[/TD]
[/TR]
[TR]
[TD="class: xl66, align: center"]2[/TD]
[TD="class: xl67, align: center"]1[/TD]
[TD="class: xl67, align: center"]2[/TD]
[TD="class: xl67, align: center"]3[/TD]
[TD="class: xl67, align: center"]4[/TD]
[TD="class: xl68, align: center"]5[/TD]
[/TR]
[TR]
[TD="class: xl69, align: center"]3[/TD]
[TD="class: xl70, align: center"]4[/TD]
[TD="class: xl70, align: center"]5[/TD]
[TD="class: xl70, align: center"]6[/TD]
[TD="class: xl70, align: center"]7[/TD]
[TD="class: xl71, align: center"]8[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You have two 6s in column D (40-59), which one do you want to return since the rows numbers are indentical in column A? The first one? The second one? Both?

in A6 put the value you're looking for in column A, e.g. 3
in A7 put the range header, e.g. 40-59

in A8
=INDEX(B2:F4,MATCH(A6,A2:A4,0),MATCH(A7,B1:F1,0))
 
Last edited:
Upvote 0
Sorry, in column A, the A2 should be 1, instead of 3.

What if there is only a number in A7, instead of a range, let's say 42. How would the formula look like then?
 
Upvote 0
Sorry, in column A, the A2 should be 1, instead of 3.

What if there is only a number in A7, instead of a range, let's say 42. How would the formula look like then?

Is this what you are looking for?


Book1
ABCDEF
180-10060-7940-5920-390-19
2145678
3212345
4345678
5
63
7426
8
Sheet1


In B7 control+shift+enter, not just enter:

=INDEX($B$2:$F$4,MATCH(A7,REPLACE($B$1:$F$1,1,FIND("-",$B$1:$F$1),"")+0,-1),MATCH(B6,$A$2:$A$4,0))

If not, try to specify the output you require a bit more precise.
 
Upvote 0
If you're happy to change your headers, you could use


Excel 2013/2016
ABCDEFGH
110079593919Row3
2112345Column45
3267891013
431112131415
Appendix
Cell Formulas
RangeFormula
H3=INDEX(B2:F4,MATCH(H1,A2:A4,0),MATCH(H2,B1:F1,-1))
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,607
Members
452,660
Latest member
Zatman

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