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

80-10060-7940-5920-390-19
345678
212345
345678

<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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