# Index with multiple match criteria (3 and more)

1. ## Index with multiple match criteria (3 and more)

Hi y'all!

Here is what I have:

I have 20 cities.

For cities, I calculated labor costs, acquisition costs, rent expenses, and many more. They are calculated in a single sheet called Inputs.

Here is how it is organized:

Section 1:
List of 20 cities: Paris to Marseille (B3 to B22)

Section 2:
List of 20 cities: Paris to Marseille (B27 to B46)

Section 3:
etc. for rent expenses and other sections

In the columns, I have dates (2021/2022/2023/2024) or monthly (2021-2024)

-------------------------------------------------------------------------------------

What I want to tell excel is that :

Go to the previously mentioned 'Input' sheet and Match "labor costs", then once you've located it, move to the below range and match the city, then Match date in cols and return the value

So I can get my results in the 'Output' sheet in the following manner :

List of variables: Labor costs, Acquisition costs, Rent expenses, etc. (B3:B7)

Dates in columns (C2:F2)

And my matched numbers C3:F7

Attached, is a mock template articulating the question.

Many thanks !

2. ## Re: Index with multiple match criteria (3 and more)

in C6

=SUMPRODUCT((INDEX(Inputs!\$E\$1:\$K\$303,MATCH(Outputs!\$B6,Inputs!\$C\$1:\$C\$303,0)+MATCH(Outputs!\$B\$3,Inputs!\$D\$1:\$D\$303,0)-3,0))*(Inputs!\$E\$35:\$K\$35=Outputs!C\$5))

OR

=INDEX(Inputs!\$E\$1:\$K\$303,MATCH(Outputs!\$B7,Inputs!\$C\$1:\$C\$303,0)+MATCH(Outputs!\$B\$3,Inputs!\$D\$1:\$D\$303,0)-3,MATCH(C\$5,Inputs!\$E\$35:\$K\$35,0))

Copy across and down

in C15

=SUMPRODUCT((INDEX(Inputs!\$E\$1:\$CJ\$303,MATCH(Outputs!\$B15,Inputs!\$C\$1:\$C\$303,0)+MATCH(Outputs!\$B\$3,Inputs!\$D\$1:\$D\$303,0)-3,0))*(Inputs!\$E\$7:\$CJ\$7=Outputs!C\$14))

OR

=INDEX(Inputs!\$E\$1:\$CJ\$303,MATCH(Outputs!\$B16,Inputs!\$C\$1:\$C\$303,0)+MATCH(Outputs!\$B\$3,Inputs!\$D\$1:\$D\$303,0)-3,MATCH(C\$14,Inputs!\$E\$7:\$CJ\$7,0))

in B3

Data validation list called "Cities"

Please ensure titles in Outputs match those in Inputs : I adjusted some

NOTE: I added additional rows in INPUTS to ensure rows between headings in column C and City rows is CONSTANT so use attached file.

3. ## Re: Index with multiple match criteria (3 and more)

Outputs

C6=IFERROR(IF(\$B6<>"",SUMIFS(INDEX(Inputs!\$D\$8:\$CJ\$275,,MATCH(Outputs!C\$5,Inputs!\$D\$34:\$J\$34,0)),Inputs!\$C\$8:\$C\$275,Outputs!\$B\$3,Inputs!\$A\$8:\$A\$275,Outputs!\$B6),""),"")

Copy across and down

C15=IFERROR(IF(\$B15<>"",SUMIFS(INDEX(Inputs!\$D\$8:\$CJ\$275,,MATCH(Outputs!C\$14,Inputs!\$D\$7:\$CI\$7,0)),Inputs!\$C\$8:\$C\$275,Outputs!\$B\$3,Inputs!\$A\$8:\$A\$275,Outputs!\$B15),""),"")

Copy across and down

I changed the file structure

The cities are selectable from the drop down list in B3

4. ## Re: Index with multiple match criteria (3 and more)

With a pivot table (for the annual data).

See the attached file.

5. ## Re: Index with multiple match criteria (3 and more)

Thanks to all of you. I implemented the first one, gonna try the two others for the learning.

6. ## Re: Index with multiple match criteria (3 and more)

If you are satisfied with the solution, please mark the question solved.

You can add reputation by clicking on the star * add reputation.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1