Find cell value from Row & Column match

nularry

New Member
Joined
Sep 5, 2011
Messages
13
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a formula to get a cell value that matches a specified item which is in the row, and specified item which is in the column title. Example below. Data is A1:E5. I am wanting a formula where the question marks are H2 to return a value of 8 (Banana row & 2021 column). Thank you for any help you can give.

20202021202220232021
Apple5732Banana???
Orange2628
Banana9852
Grape6595
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I am trying to create a formula to get a cell value that matches a specified item which is in the row, and specified item which is in the column title. Example below. Data is A1:E5. I am wanting a formula where the question marks are H2 to return a value of 8 (Banana row & 2021 column). Thank you for any help you can give.

20202021202220232021
Apple5732Banana???
Orange2628
Banana9852
Grape6595
These are actually in different tabs.
 
Upvote 0
=INDEX(B2:E5, MATCH("Banana", A2:A5, 0), MATCH(2021, B1:E1, 0))
 
Upvote 0
These are actually in different tabs.
If the first is Sheet1...

Put this on the other sheet "tab".

=INDEX(Sheet1!B2:E5, MATCH("Banana", Sheet1!A2:A5, 0), MATCH(2021, Sheet1!B1:E1, 0))


That's if Apple is A2 and 2020 is B1...
 
Upvote 0
Book1.xlsx
ABCDEFGH
120202021202220232021
2Apple5732Banana8
3Orange2628
4Banana9852
5Grape6595
Sheet4
Cell Formulas
RangeFormula
H2H2= INDEX(B2:E5,MATCH(G2,A2:A5,0),MATCH(H1,B1:E1,0))

_______________________________________
EDIT:
Excel Formula:
= INDEX(Sheet1!B2:E5,MATCH(A2,Sheet1!A2:A5,0),MATCH(B1,Sheet1!B1:E1,0))

Just replace all occurences of "Sheet1" with your sheet name.
 
Upvote 0
If the first is Sheet1...

Put this on the other sheet "tab".

=INDEX(Sheet1!B2:E5, MATCH("Banana", Sheet1!A2:A5, 0), MATCH(2021, Sheet1!B1:E1, 0))


That's if Apple is A2 and 2020 is B1...
Thank you very much for the help.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
1691407086880.png
 
Upvote 0
Why use the volatile offset function, when there is no need for it?
 
Upvote 0
Solution # 2:

=INDEX(B3:E6,MATCH(G3,A3:A6,0),MATCH(G2,B2:E2,0))

Solution # 3:

=XLOOKUP(G3,A3:A6,XLOOKUP(G2,B2:E2,B3:E6))

Solution # 4:

=SUMPRODUCT((A3:A6=G3)*(B2:E2=G2)*(B3:E6))

Solution # 5:

=VLOOKUP(G3,A2:E6,MATCH(G2,B2:E2,0)+1,0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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