Index Match formula for Google Sheets

jimbogarner

Board Regular
Joined
Apr 22, 2010
Messages
102
Hi,

I'm trying to use an index match formula that looks up multiple criteria in a grid, however, the issue I have is that there will be multiple lines that meet the same criteria and I want it to sum them all up? So for example I have the following table in a tab called TM1 Data Dump
1674826063529.png



I have the below formula in a different sheet;
=-INDEX(TM1_Data_Dump!$F$13:$P$2298,MATCH(1,(TM1_Data_Dump!$A$13:$A$2298=$D4)*(TM1_Data_Dump!$B$13:$B$2298=$B$6)*(TM1_Data_Dump!$D$13:$D$2298=$C6),0),MATCH(1,(TM1_Data_Dump!$F$11:$P$11=D$2)*(TM1_Data_Dump!$F$12:$P$12=D$3)))

The issue is, I need it to look up the quarter but as the data is retrieved by month it doesn't sum the 3 entries per quarter up... the other issue is, this is per our financial year, so Q1=Jul-Sep...

Edit - forgot to add the snip from the second tab the formula is in;

1674826437437.png

Thanks,

James
 
Last edited by a moderator:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Is this for Google Sheets or Excel?
 
Upvote 0
This might, with hindsight be easier with a SUM IF, but the column it sums from is dynamic based on the last 2 selections, IE GL Actual/2021 for example.... I just don't know how to do this
 
Upvote 0
If you want to sum all matching rows, then you need to use sumifs, or the filter function.
 
Upvote 0
How do I make the sum if column dynamic? IE for GL Actual/2021 it would sum up column H, however, GL Actual, 2022 would sum up column I etc....
 
Upvote 0
Use sumproduct.
For example:
Dante Amor
ABCDEFGHIJKLMN
1
10
11GL ActualGL ActualGL ActualGL ActualGL ActualForecast Q1Forecast Q2LRPLRP
12QtrCat aweekRelessCost201920202021202220232023202320242025
13Q4aJulAirtime93,75812,57236,95950,90219,84210,88511,67558,22574,632
14Q4aJulAirtime89,02615,55690,06348,74435,12326,1251,20724,73785,514
15Q4aJulS&P90,32530,71651,26311,34291,93516,57513,09421,09675,770
16Q4aJulS&P84,65269,64638,42935,96383,65394,82342,77355,27987,892
17Q4aJulAirtime4,45288,20163,23265,43982,64857,12391,72139,50644,648
TM1_Data_Dump


FORMULA
Dante Amor
ABCDEFGH
1
2GL ActualGL ActualGL ActualForecast Q1Forecast Q2
3Year20192020202120232023
4PeriodQ4Q4Q4Q4Q4
5
6aAirtime187,236116,329190,25494,133104,603
7aS&P174,977100,36289,692111,39855,867
Sheet2
Cell Formulas
RangeFormula
D6:H7D6=SUMPRODUCT((TM1_Data_Dump!$A$13:$A$3000=D$4)*(TM1_Data_Dump!$B$13:$B$3000=$B6)*(TM1_Data_Dump!$D$13:$D$3000=$C6)*(TM1_Data_Dump!$F$11:$P$11=D$2)*(TM1_Data_Dump!$F$12:$P$12=D$3)*(TM1_Data_Dump!$F$13:$P$3000))


NOTE XL2BB:
For the future, it would help greatly if you could give us the sample data in a form that we can copy to test with, rather that a picture.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Solution
How do I make the sum if column dynamic?
In much the same way as you did in the formula you posted
Excel Formula:
=FILTER(FILTER(TM1_Data_Dump!$F$13:$P$2298,(TM1_Data_Dump!$A$13:$A$2298=$D4)*(TM1_Data_Dump!$B$13:$B$2298=$B$6)*(TM1_Data_Dump!$D$13:$D$2298=$C6)),(TM1_Data_Dump!$F$11:$P$11=D$2)*(TM1_Data_Dump!$F$12:$P$12=D$3))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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