Celeb Glow
news | March 09, 2026

Nesting MATCH and INDEX formula within a SUMPRODUCT

As the title suggests, I am looking for a way to combine the SUMPRODUCT functionalities with an INDEX and MATCH formula, but if a better approach exists to help solve the problem below I am also open to it.

In the below example, imagine that the tables are on different sheets. I have a report that has the sales of each ID in the rows and each month in the columns (first table). Unfortunately, the report only has IDs and not the region they belong to, but I do have a look up table which labels each ID with their respective region (second table):

ABCD
1IDJanuaryFebruaryMarch
2110520
335510
470105
51410255
62551010
727101010
844555
AB
1IDRegion
21East
33East
47Central
514Central
625Central
727West
844West

My goal is to be able to aggregate the sales by region as per the result below. However I would only like to show sales data that belong to the month that is shown in cell D2.

Goal:

ABCD
1RegionSalesFebruary
2East10
3Central45
4West15

I have used the INDEX and MATCH combination to return a single value, but not sure how I can return multiple values with it and aggregate them at the same time. Any insight would be appreciated!

1 Answer

Use INDEX/MATCH to return the correct column to a SUMIFS.

The SUMIFS returns an array of numbers to the SUMPRODUCT that we filter with a Boolean:

=SUMPRODUCT(SUMIFS(INDEX(Sheet1!$B:$D,0,MATCH($D$1,Sheet1!$B$1:$D$1,0)),Sheet1!A:A,Sheet2!$A$2:$A$8)*(Sheet2!$B$2:$B$8=A2))

Note: Sheet1 and Sheet2 are your first and second tables respectively. You will need to change the names to your correct sheet names.

enter image description here

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy