Index and Match with Concatenate

cpatomba18

New Member
Joined
Feb 3, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I am trying to retrieve data from a single data tab and output it to a summary tab.

The summary tab has two drop down validations. The 1st is to retrieve the name of the city. The 2nd is to retrieve the name of the division.

On my data tab, I have two columns - 1st is the city name and 2nd is the division name. I also have two header rows - 1st header row is Year and 2nd header row is Quarter.

My output on the summary tab needs to have the quarter of the calendar year in the column and the year in the row. Right now I am trying a combination of INDEX/MATCH/CONCATENATE as an array function and getting "N/As".

Wondering if this is because my structure in my data set is different from how I want the output?
 

Attachments

  • Summary.PNG
    Summary.PNG
    27.3 KB · Views: 19
  • Datas Tab.PNG
    Datas Tab.PNG
    35.7 KB · Views: 18

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi CPATomba18,

You can INDEX into a 2D array by specifying the row and column. In your case you need to match 2 items to retrieve both:
  1. Row: match City and Division.
  2. Column: match Year and Quarter

Here's my test data:

CPATomba18.xlsx
BCDEFGHIJK
420142014201420142015201520152015
5CityDivisionQ1Q2Q3Q4Q1Q2Q3Q4
6San FranciscoMarketing106,78273,99755,5931,556181,61464,65770,91034,154
7San FranciscoFinance138,053108,899177,037186,03580,18150,29933,1654,031
8San FranciscoSales136,72268,99582,08539,83470,986115,06541,910189,719
9Los AngelesMarketing84,106167,42320,218171,03134,73624,68795,55070,036
10Los AngelesFinance98,8235,10831,2461,005151,941191,55612,187176,756
11Los AngelesSales92,02530,27097,68570,92579,865162,7349,220144,662
Datas Tab


Here's my Summary sheet:

CPATomba18.xlsx
BCDEF
4San FranciscoSelect City
5
6FinanceSelect Division
7
8
920142015
10Q1138,05380,181
11Q2108,89950,299
12Q3177,03733,165
13Q4186,0354,031
Summary
Cell Formulas
RangeFormula
E10:F13E10=INDEX('Datas Tab'!$D$6:$K$11,MATCH(1,INDEX(('Datas Tab'!$B$6:$B$11=$B$4)*('Datas Tab'!$C$6:$C$11=$B$6),0),0),MATCH(1,INDEX(('Datas Tab'!$D$4:$K$4=E$9)*('Datas Tab'!$D$5:$K$5=$D10),0),0))
Cells with Data Validation
CellAllowCriteria
B4ListSan Francisco,Los Angeles
B6ListMarketing,Finance,Sales
 
Upvote 0
Solution
This is fantastic. Thank you very much save me so much headache now trying to figure this out!
 
Upvote 0
Since you have Excel 365, you could also try this.

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

cpatomba18.xlsm
BCDEFGHIJK
420142014201420142015201520152015
5Q1Q2Q3Q4Q1Q2Q3Q4
6San FranM475,566406,937599,311574,09185,159514,779452,753445,999
7San FranF99,800221,742462,93255,410439,824597,162206,462266,176
8San FranS165,44691,088461,498163,797262,685160,432136,749112,967
9LAM190,999134,592288,265519,849477,969384,426315,470411,145
10LAF217,752440,61997,275104,233403,048501,383383,331539,208
11LAS173,460109,941226,919532,522572,14864,971310,43055,355
Data


cpatomba18.xlsm
ABCDEF
4LACity
5
6FDivision
7
8
9
1020142015
11Q1217,752403,048
12Q2440,619501,383
13Q397,275383,331
14Q4104,233539,208
Summary
Cell Formulas
RangeFormula
E11:F14E11=FILTER(FILTER(Data!$D$6:$K$11,(Data!$B$6:$B$11=$A$4)*(Data!$C$6:$C$11=$A$6)),(Data!$D$4:$K$4=E$10)*(Data!$D$5:$K$5=$D11))
 
Upvote 0
Since you have Excel 365, you could also try this.

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

cpatomba18.xlsm
BCDEFGHIJK
420142014201420142015201520152015
5Q1Q2Q3Q4Q1Q2Q3Q4
6San FranM475,566406,937599,311574,09185,159514,779452,753445,999
7San FranF99,800221,742462,93255,410439,824597,162206,462266,176
8San FranS165,44691,088461,498163,797262,685160,432136,749112,967
9LAM190,999134,592288,265519,849477,969384,426315,470411,145
10LAF217,752440,61997,275104,233403,048501,383383,331539,208
11LAS173,460109,941226,919532,522572,14864,971310,43055,355
Data


cpatomba18.xlsm
ABCDEF
4LACity
5
6FDivision
7
8
9
1020142015
11Q1217,752403,048
12Q2440,619501,383
13Q397,275383,331
14Q4104,233539,208
Summary
Cell Formulas
RangeFormula
E11:F14E11=FILTER(FILTER(Data!$D$6:$K$11,(Data!$B$6:$B$11=$A$4)*(Data!$C$6:$C$11=$A$6)),(Data!$D$4:$K$4=E$10)*(Data!$D$5:$K$5=$D11))
Good to know as well! Thanks!
 
Upvote 0
.. another option for all versions too.

cpatomba18.xlsm
ABCDEF
4LACity
5
6FDivision
7
8
9
1020142015
11Q1217,752403,048
12Q2440,619501,383
13Q397,275383,331
14Q4104,233539,208
Summary (2)
Cell Formulas
RangeFormula
E11:F14E11=SUMPRODUCT((Data!$B$6:$B$11=$A$4)*(Data!$C$6:$C$11=$A$6)*(Data!$D$4:$K$4=E$10)*(Data!$D$5:$K$5=$D11),Data!$D$6:$K$11)
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

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