Two-dimensional lookup based on multiple criteria

roberk9

New Member
Joined
Oct 10, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I need help with entering data from other sheets into a "Summary" sheet based on multiple criteria.

In my example workbook, I have the Summary sheet to compile information from sheets of data for each year.
Column headers: Fruit type-YR (ex: Cherry-22)
Row header #1: Location (ex: Sacramento)
Row header #2: Person (ex: Nancy)
For example: I want to pull from from Sheet "22", matching text in a specific column ("Cherry-22"), and a row with multiple criteria ("Sacramento" and "Nancy". I also want to match the values in existing cells in my summary sheet, rather than typing values into a formula (i.e., D1 vs. "Cherry-22")

I tried to use an Index-Match to reference the column and row headers, but wasn't able to get a result at all. I tried adjusting, creating practice sheets, searching for examples, but I still have nothing.

Thanks!

ExcelPracticeMultipleCriteria.xlsx
ABCDEFGHIJKLMN
1Apple-22Cherry-22Peach-22All-22Apple-23Cherry-23Peach-23All-23Apple-24Cherry-24Peach-24All-24
2CADan
3CANancy
4CAJoe
5CABeth
6CAAll
7SacramentoDan
8SacramentoNancy
9SacramentoJoe
10SacramentoBeth
11SacramentoAll
12San FranciscoDan
13San FranciscoNancy
14San FranciscoJoe
15San FranciscoBeth
16San FranciscoAll
17Los AngelesDan
18Los AngelesNancy
19Los AngelesJoe
20Los AngelesBeth
21Los AngelesAll
22BakersfieldDan
23BakersfieldNancy
24BakersfieldJoe
25BakersfieldBeth
26BakersfieldAll
Summary

ExcelPracticeMultipleCriteria.xlsx
ABCDEF
1Apple-22Cherry-22Peach-22All-22
2CADan14121339
3CANancy1491740
4CAJoe1317939
5CABeth2312843
6CAAll645047161
7
8SacramentoDan26614
9SacramentoNancy75618
10SacramentoJoe53311
11SacramentoBeth65415
12SacramentoAll20191958
13
14San FranciscoDan5139
15San FranciscoNancy40812
16San FranciscoJoe26210
17San FranciscoBeth95317
18San FranciscoAll20121648
19
20BakersfieldDan75416
21BakersfieldNancy34310
22BakersfieldJoe68418
23BakersfieldBeth82111
24BakersfieldAll24191255
22
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
i added some to the data table
---------------
Book1
ABCDEF
1Apple-22Cherry-22Peach-22All-22
2CADan14121339
3CANancy1491740
4CAJoe1317939
5CABeth2312843
6CAAll645047161
7SacramentoDan26614
8SacramentoNancy75618
9SacramentoJoe53311
10SacramentoBeth65415
11SacramentoAll20191958
12San FranciscoDan5139
13San FranciscoNancy40812
14San FranciscoJoe26210
15San FranciscoBeth95317
16San FranciscoAll20121648
17BakersfieldDan75416
18BakersfieldNancy34310
19BakersfieldJoe68418
20BakersfieldBeth82111
21BakersfieldAll24191255
22Los AngelesDan1236
23Los AngelesNancy3216
24Los AngelesJoe45615
25Los AngelesBeth65415
26Los AngelesAll14141442
Sheet2

----------------
results:
----------------
Book1
ABCDEFGHIJKLMN
1Apple-22Cherry-22Peach-22All-22Apple-23Cherry-23Peach-23All-23Apple-24Cherry-24Peach-24All-24
2CADan14121339        
3CANancy1491740        
4CAJoe1317939        
5CABeth2312843        
6CAAll645047161        
7SacramentoDan26614        
8SacramentoNancy75618        
9SacramentoJoe53311        
10SacramentoBeth65415        
11SacramentoAll20191958        
12San FranciscoDan5139        
13San FranciscoNancy40812        
14San FranciscoJoe26210        
15San FranciscoBeth95317        
16San FranciscoAll20121648        
17Los AngelesDan1236        
18Los AngelesNancy3216        
19Los AngelesJoe45615        
20Los AngelesBeth65415        
21Los AngelesAll14141442        
22BakersfieldDan75416        
23BakersfieldNancy34310        
24BakersfieldJoe68418        
25BakersfieldBeth82111        
26BakersfieldAll24191255        
Sheet1
Cell Formulas
RangeFormula
C2:N26C2=IFERROR(INDEX(Sheet2!$C$2:$F$26,MATCH($A2&$B2,Sheet2!$A$2:$A$26&Sheet2!$B$2:$B$26,0), MATCH(C$1,Sheet2!$C$1:$F$1,0)),"")
 
Upvote 0
Solution
i added some to the data table
---------------
Book1
ABCDEF
1Apple-22Cherry-22Peach-22All-22
2CADan14121339
3CANancy1491740
4CAJoe1317939
5CABeth2312843
6CAAll645047161
7SacramentoDan26614
8SacramentoNancy75618
9SacramentoJoe53311
10SacramentoBeth65415
11SacramentoAll20191958
12San FranciscoDan5139
13San FranciscoNancy40812
14San FranciscoJoe26210
15San FranciscoBeth95317
16San FranciscoAll20121648
17BakersfieldDan75416
18BakersfieldNancy34310
19BakersfieldJoe68418
20BakersfieldBeth82111
21BakersfieldAll24191255
22Los AngelesDan1236
23Los AngelesNancy3216
24Los AngelesJoe45615
25Los AngelesBeth65415
26Los AngelesAll14141442
Sheet2

----------------
results:
----------------
Book1
ABCDEFGHIJKLMN
1Apple-22Cherry-22Peach-22All-22Apple-23Cherry-23Peach-23All-23Apple-24Cherry-24Peach-24All-24
2CADan14121339        
3CANancy1491740        
4CAJoe1317939        
5CABeth2312843        
6CAAll645047161        
7SacramentoDan26614        
8SacramentoNancy75618        
9SacramentoJoe53311        
10SacramentoBeth65415        
11SacramentoAll20191958        
12San FranciscoDan5139        
13San FranciscoNancy40812        
14San FranciscoJoe26210        
15San FranciscoBeth95317        
16San FranciscoAll20121648        
17Los AngelesDan1236        
18Los AngelesNancy3216        
19Los AngelesJoe45615        
20Los AngelesBeth65415        
21Los AngelesAll14141442        
22BakersfieldDan75416        
23BakersfieldNancy34310        
24BakersfieldJoe68418        
25BakersfieldBeth82111        
26BakersfieldAll24191255        
Sheet1
Cell Formulas
RangeFormula
C2:N26C2=IFERROR(INDEX(Sheet2!$C$2:$F$26,MATCH($A2&$B2,Sheet2!$A$2:$A$26&Sheet2!$B$2:$B$26,0), MATCH(C$1,Sheet2!$C$1:$F$1,0)),"")
@ExceLoki
Yes, this worked! Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,058
Members
448,940
Latest member
mdusw

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