SUMIFS INDEX and MATCH

atearth

New Member
Joined
Feb 25, 2015
Messages
39
Office Version
  1. 365
  2. 2013
  3. 2007
Platform
  1. Windows
  2. Web
Hi all,

I'm trying to use SUMIFS INDEX and MATCH but the answer I get is wrong.
Anyone know what the answer is to a problem I have?
Please see the image below.
Thank you in advance

Excel Formula:
=SUMIFS(INDEX($F$15:$M$18,0,MATCH(F$24,$F$14:$M$14,0)),$D$15:$D$18,$D25)


1675461906944.png
 
Last edited:
does anything in rows 3 thru 12 have anything to do with your calculation in H25? I htink not. I just want to be sure I have not overlooked anything.
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Row 3 to 12 is just background data.

Has no use in this situation
 
Upvote 0
Maybe something like this.
Change ranges to match your data.

Book2
DEFGHIJ
1
2WBS CodesJan-23Jan-23Jan-23Jan-23Feb-23Feb-23
3100450450
4101675675
5102900900
6103225.00225.00225.00225.00225.00225.00
7
8
9
10WBS CodesJan-23Feb-23
11100450450
12101675675
13102900900
14103900450
Sheet3
Cell Formulas
RangeFormula
E11:F14E11=SUMPRODUCT(--($D11=$D$3:$D$6)*--($E$2:$J$2=E$10)*$E$3:$J$6)
 
Upvote 0
ignore this. message. i made errors.
 
Upvote 0
Here is my version of it.
Comment regarding the dates: The column header format needs to match the lookup format. If you have date values on the header row, the lookup must also be a date value. You can have different days of the month in the header. The formula only looks at the month. However, if you put multiple years then you'llneed to tweak the formula to get the correct year. Or you can have text inboth. but it should match.
Book1
DEFGHIJKLM
14Jan 23Jan 23Jan 23Jan 23Feb 23Feb 23Feb 23Feb 23
15100450000450000
16101067500067500
17102009000009000
18103225225225225225225225225
19
20
21Jan 23
22103900
Sheet3
Cell Formulas
RangeFormula
F22F22=SUMPRODUCT(INDEX($F$15:$M$18,MATCH($D22,$D$15:$D$18,0),1):INDEX($F$15:$M$18,MATCH($D22,$D$15:$D$18,0),COLUMNS($F$14:$M$14)), (--(MONTH($F$21)=MONTH($F$14:$M$14))))
 
Upvote 0
@AhoyNC @awoohaw
Thank you both for trying but I was lead to believe that doing this via SUMPRODUCT instead of SUMIFS INDEX and MATCH impacts the performance of an excel file.
Wondering what a SUMIFS INDEX and MATCH version of this would look like.
 
Upvote 0
@AhoyNC @awoohaw
Thank you both for trying but I was lead to believe that doing this via SUMPRODUCT instead of SUMIFS INDEX and MATCH impacts the performance of an excel file.
Wondering what a SUMIFS INDEX and MATCH version of this would look like.
How big is your workbook? If it is small I would not worry.
 
Upvote 0
At the moment 3MB, just that I know it will end up being 10MB plus soon.
As I will be using the formula in another document.

The formula that @AhoyNC created works just that I am using it in 54,000 cells.

And saving the document now takes ages.

Calculating 8 threads.
So hope to find a SUMIFS INDEX and MATCH instead of SUMPRODUCT
 
Upvote 0
This is without SUMPRODUCT or SUMIF.
Book1
DEFGHIJKLM
14Jan 23Jan 23Jan 23Jan 23Feb 23Feb 23Feb 23Feb 23
15100450000450000
16101067500067500
17102009000009000
18103225225225225225225225225
19
20
21Jan 232/1/2023
22100450450
23101675675
24102900900
25103900900
26
sumproduct on grid
Cell Formulas
RangeFormula
F22:G25F22=SUM(INDEX($F$15:$M$18,MATCH($D22,$D$15:$D$18,0),1): INDEX($F$15:$M$18,MATCH($D22,$D$15:$D$18,0),COLUMNS($F$14:$M$14)) *(--MONTH(F$21)=MONTH($F$14:$M$14)))
 
Upvote 0
With SUMIFS your ranges need to be the same size which yours are not.
Here is an option with FILTER function (Excel 365)
Book2
DEFGHIJ
1
2WBS CodesJan-23Jan-23Jan-23Jan-23Feb-23Feb-23
3100450450
4101675675
5102900900
6103225.00225.00225.00225.00225.00225.00
7
8
9
10WBS CodesJan-23Feb-23
11100450450
12101675675
13102900900
14103900450
Sheet3
Cell Formulas
RangeFormula
E11:E14E11=SUM(FILTER(FILTER($E$3:$J$6,(E$2:J$2=E$10)),$D11=$D$3:$D$6))
F11:F14F11=SUM(FILTER(FILTER($E$3:$J$6,(E$2:J$2=F$10)),$D11=$D$3:$D$6))
 
Upvote 0

Forum statistics

Threads
1,215,640
Messages
6,125,976
Members
449,276
Latest member
surendra75

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