Index/Match with Multiple Criteria Sets

DShack

Board Regular
Joined
Jan 15, 2014
Messages
64
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello All,

I am attempting to write a statement that will take 4 different criteria and match it with a data set in another sheet. I am trying to match on name, date, reg, ot to bring back the hours and overtime worked on various dates. I have tried using this formula but continue to get REF errors. =INDEX('5.11'!$C$7:$D$25,MATCH(1,(B11='5.11'!$B$7:$B$25)*(Master!C6='5.11'!$C$6)*(Master!D6='5.11'!D6)*(C5='5.11'!C5),0))

The example below i should be able to pull 3 and 1.5 hours of REG and OT for B, Roger


1650653341580.png

1650653370502.png
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Your example isn't clear. You have the follow four conditions:
Excel Formula:
(B11='5.11'!$B$7:$B$25)*
(Master!C6='5.11'!$C$6)*
(Master!D6='5.11'!D6)*
(C5='5.11'!C5)
What is the sheet name in your example? How are the data arranged in sheets 5.11 and Master? As written, your last three conditions each compare a single value to another single value, resulting in either a TRUE or FALSE, which is then multiplied by an array of TRUE's and FALSE's. A single FALSE in any of the last three conditions renders 0's in the entire resulting array, and the MATCH function will never find a "1". What are the ranges on the Master and 5.11 sheets that you need to consider?
 
Upvote 0
Hi Kirk,

Here is the full view from both sheets that i am working with. I am trying to pull the information from 5.11 into the Master. I have several other dates that i need to pull over but this provides an example. Does that help?
1650658826268.png
1650659216897.png
 
Upvote 0
Given this in your 5.11 sheet:
1650658826268.xlsx
ABCDEFGHIJKLMNOP
1
2WEEKLY CALCULATION
3SATURDAY SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY
45/5/20185/5/20185/6/20185/6/20185/7/20185/7/20185/8/20185/8/20185/9/20185/9/20185/10/20185/10/20185/11/20185/11/2018
5REGOTREGOTREGOTREGOTREGOTREGOTREGOT
61xxxB, Maryxxx00000030.530.53140
72xxxM, Richardxxx00000030.5003100
83xxxC, Helenxxx00000030.531.54040
94xxxA, Rogerxxx00000000000000
105xxxB, Rogerxxx31.5000030.5004070.5
116xxxM, Jeffreyxxx31.5000030.5004000
127xxxL, Osiexxx00000000000000
138xxxP, Fxxx750000310040.570.5
149xxxL, Jeffreyxxx75000030.5004070.5
1510xxxC, Jxxx43.5000000004040
1611xxxS, Anaxxx75.5000030.5004070.5
1712xxxLin, Lxxx75.5000031000071.5
1813xxxL, Sucrexxx75.5000040004031.5
1914xxxA, Edwardxxx000000400031.570.5
2015xxxZ, Josexxx43.5000040000070.5
2116xxxW, Basilioxxx43.50000000071.500
2217xxxS,Jeremyxxx43.5000000004030.5
2318xxxG, Gabrielxxx43.540.50000000031
2419xxxW, Marioxxx43.540.50000004030.5
5.11

...try this in your Master sheet:
1650658826268.xlsx
ABCDEFGHI
1
2
3SATURDAY SUNDAY MONDAY TUESDAY
45/5/20185/5/20185/6/20185/6/20185/7/20185/7/20185/8/2018
5REGOTREGOTREGOTREG
61xxxB, Maryxxx0000003
72xxxM, Richardxxx0000003
83xxxC, Helenxxx0000003
94xxxA, Rogerxxx0000000
105xxxB, Rogerxxx31.500003
116xxxM, Jeffreyxxx31.500003
Master
Cell Formulas
RangeFormula
C6:I11C6=INDEX('5.11'!$C$6:$P$24,MATCH($B6,'5.11'!$B$6:$B$24,0),MATCH(1,(C$4='5.11'!$C$4:$P$4)*(C$5='5.11'!$C$5:$P$5),0))

Adjust the ranges as necessary and be mindful of which references need to be "fixed".
 
Upvote 0
Given this in your 5.11 sheet:
1650658826268.xlsx
ABCDEFGHIJKLMNOP
1
2WEEKLY CALCULATION
3SATURDAY SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY
45/5/20185/5/20185/6/20185/6/20185/7/20185/7/20185/8/20185/8/20185/9/20185/9/20185/10/20185/10/20185/11/20185/11/2018
5REGOTREGOTREGOTREGOTREGOTREGOTREGOT
61xxxB, Maryxxx00000030.530.53140
72xxxM, Richardxxx00000030.5003100
83xxxC, Helenxxx00000030.531.54040
94xxxA, Rogerxxx00000000000000
105xxxB, Rogerxxx31.5000030.5004070.5
116xxxM, Jeffreyxxx31.5000030.5004000
127xxxL, Osiexxx00000000000000
138xxxP, Fxxx750000310040.570.5
149xxxL, Jeffreyxxx75000030.5004070.5
1510xxxC, Jxxx43.5000000004040
1611xxxS, Anaxxx75.5000030.5004070.5
1712xxxLin, Lxxx75.5000031000071.5
1813xxxL, Sucrexxx75.5000040004031.5
1914xxxA, Edwardxxx000000400031.570.5
2015xxxZ, Josexxx43.5000040000070.5
2116xxxW, Basilioxxx43.50000000071.500
2217xxxS,Jeremyxxx43.5000000004030.5
2318xxxG, Gabrielxxx43.540.50000000031
2419xxxW, Marioxxx43.540.50000004030.5
5.11

...try this in your Master sheet:
1650658826268.xlsx
ABCDEFGHI
1
2
3SATURDAY SUNDAY MONDAY TUESDAY
45/5/20185/5/20185/6/20185/6/20185/7/20185/7/20185/8/2018
5REGOTREGOTREGOTREG
61xxxB, Maryxxx0000003
72xxxM, Richardxxx0000003
83xxxC, Helenxxx0000003
94xxxA, Rogerxxx0000000
105xxxB, Rogerxxx31.500003
116xxxM, Jeffreyxxx31.500003
Master
Cell Formulas
RangeFormula
C6:I11C6=INDEX('5.11'!$C$6:$P$24,MATCH($B6,'5.11'!$B$6:$B$24,0),MATCH(1,(C$4='5.11'!$C$4:$P$4)*(C$5='5.11'!$C$5:$P$5),0))

Adjust the ranges as necessary and be mindful of which references need to be "fixed".


Thank you so much! This worked and I understand what i did wrong.
 
Upvote 0
You're welcome...I'm happy to help. In your example, because you need a two-way lookup, the INDEX(array,row,column) function incorporates separate MATCH functions for the row and column positions.
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,696
Members
449,048
Latest member
81jamesacct

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