Index/Match Across Workbooks with Multiple Criteria

OandGmodeling

New Member
Joined
Apr 5, 2019
Messages
8
Hello,

I am trying to pull certain data from a raw data file that is updated weekly from another source and place it in a more presentable model. I am having to use multiple criteria (Columns A and B below) to try and get the appropriate lookup value from Column C through F but am not having much luck. I am also trying to make the formula flexible since the data range will likely change on a weekly basis. My lookup values are from the model and are presented in the exact same text as in the raw file. Thanks!

Here is the formula I am using that is returning a #VALUE error when not used as an array, which I would prefer not to use if possible:

=INDEX([Rigs_04012019.xlsx]Rigs!$C:$C,MATCH($B$103&B$104,[Rigs_04012019.xlsx]Rigs!$A:$A&[Rigs_04012019.xlsx]Rigs!$B:$B,0))

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Play[/TD]
[TD]Operator (reported)[/TD]
[TD]Drilling[/TD]
[TD]Formation[/TD]
[TD]County[/TD]
[TD]Depth[/TD]
[/TR]
[TR]
[TD][Delaware][/TD]
[TD]Standard Oil[/TD]
[TD]Y[/TD]
[TD]Reeves[/TD]
[TD]Bone Spring[/TD]
[TD]20000[/TD]
[/TR]
[TR]
[TD][Midland][/TD]
[TD]Standard Oil[/TD]
[TD]N[/TD]
[TD]Martin[/TD]
[TD]Wolf Camp[/TD]
[TD]15000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
"more presentable model." Thats actually what you should be using, Data Model.
Using PowerQuery/Get and Transform.
 
Upvote 0
Try this

=INDICE([Rigs_04012019.xlsx]Rigs!$C$2:$C$20,
SUMAPRODUCTO(([Rigs_04012019.xlsx]Rigs!$A$2:$A$20=B103)*
([Rigs_04012019.xlsx]Rigs!$B$2:$B$20=B104)*
(FILA([Rigs_04012019.xlsx]Rigs!$A$2:$A$20)))-1)
 
Upvote 0
Or in English :rofl:

=INDEX([Rigs_04012019.xlsx]Rigs!$C$2:$C$20,
SUMPRODUCT(([Rigs_04012019.xlsx]Rigs!$A$2:$A$20=B103)*
([Rigs_04012019.xlsx]Rigs!$B$2:$B$20=B104)*
(ROW([Rigs_04012019.xlsx]Rigs!$A$2:$A$20)))-1)
 
Upvote 0
Sorry:

=INDEX([Rigs_04012019.xlsx]Rigs!$C$2:$C$20,
SUMPRODUCT(([Rigs_04012019.xlsx]Rigs!$A$2:$A$20=B103)*
([Rigs_04012019.xlsx]Rigs!$B$2:$B$20=B104)*
(ROW([Rigs_04012019.xlsx]Rigs!$A$2:$A$20)))-1)

Thanks
MARK858
 
Upvote 0
Try...

Code:
=INDEX([Rigs_04012019.xlsx]Rigs!$C:$C,MATCH($B$103&"#"&B$104,INDEX([Rigs_04012019.xlsx]Rigs!$A:$A&"#"&[Rigs_04012019.xlsx]Rigs!$B:$B,0),0))

...confirmed with just ENTER.

Hope this helps!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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