Index Match match match? #REF

orangebloss

Board Regular
Joined
Jun 5, 2013
Messages
51
Office Version
  1. 365
Platform
  1. Windows
I'm trying to look up values based on three criteria - my gut is that this needs to be an array formula but I'm beggared if I can get it to work. My source table looks as follows:


ProjectCategory123456
Project ACategory A943602
Project ACategory B732756
Project BCategory A543978
Project BCategory B918273

My Results table looks at the source table and returns the values based on the Project and Category specified in other cells

ABCDE
1Project B
2Category1234
3Category A
4Category B

Which should produce the following results

ABCDE
1Project B
2Category1234
3Category A5439
4Category B9182

Index Match Match doesn't seem to work (presumably as it's all columns?) Any assistance is much appreciated!!

Essentially if the Category, Project and month (values 1 to 4 etc) all match then return the value

Alternatively is there an alternative way to structure my source table?
 
Last edited:

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Sheet1

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
1​
Project Category 1 2 3 4 5 6
2​
Project A Category A 9 4 3 6 0 2
3​
Project A Category B 7 3 2 7 5 6
4​
Project B Category A 5 4 3 9 7 8
5​
Project B Category B 9 1 8 2 7 3

Sheet2

Row\Col
A​
B​
C​
D​
E​
1​
Project B
2​
Category 1 2 3 4
3​
Category A 5 4 3 9
4​
Category B 9 1 8 2
5​

In B3 control+shift+enter, not just enter, copy across, and down:

=INDEX(Sheet1!$C$2:$H$5,MATCH(1,IF(Sheet1!$A$2:$A$5=$A$1,IF(Sheet1!$B$2:$B$5=$A3,1)),0),MATCH(B$2,Sheet1!$C$1:$H$1,0))
 
Upvote 0
You could also try this variation that does not require the array entry, & for me is a little faster (only relevant if you have a lot of these formulas on your sheet).

For the same layout as Aladin posted, in B3 of Sheet2 copied across and down

=INDEX(Sheet1!$C$2:$H$5,MATCH($A$1&"|"&$A3,INDEX(Sheet1!$A$2:$A$5&"|"&Sheet1!$B$2:$B$5,0),0),MATCH(B$2,Sheet1!$C$1:$H$1,0))
 
Upvote 0
Brilliant ! thank you to both of you! I went with the array in the end but both your swift responses are much appreciated!!
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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