Help with SUMIFS dynamic sum range

gohawks222

New Member
Joined
Feb 2, 2016
Messages
21
I've found various topics about this, but I just can't seem to get mine to work. Here is my formula:

Code:
=SUMIFS(INDEX('[FY16 ForecastMaster.xlsm]Orders'!$B:$NW, 0, MATCH(DateMatrix!$F$1, '[FY16 ForecastMaster.xlsm]Orders'!$B$2:$NW$2,0)), '[FY16 ForecastMaster.xlsm]Orders'!$B$2:$B$357, Sheet1!B2)

I'm getting a #VALUE error, and I have a feeling it's because of the dates. The sum range (column label are week-end dates) should change based on the match from the date matrix. The week-end date in F1 for example is derived from a vlookup, which is derived from TODAY(), so there may be some volatility there. The column labels are in the range B2:B357, and it should just change to match the F1 value.

Thank you.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
It's because the sum range and criteria ranges are of different dimentions.
The sum range is an entire column, but the criteria range is only rows 2 to 357

Try changing
FY16 ForecastMaster.xlsm]Orders'!$B:$NW
to
FY16 ForecastMaster.xlsm]Orders'!$B$2:$NW$357
 
Upvote 0
Also, since it's only 1 criteria, it should be just sumif, not sumifS

=SUMIF('[FY16 ForecastMaster.xlsm]Orders'!$B$2:$B$357, Sheet1!B2, INDEX('[FY16 ForecastMaster.xlsm]Orders'!$B$2:$NW$357, 0, MATCH(DateMatrix!$F$1, '[FY16 ForecastMaster.xlsm]Orders'!$B$2:$NW$2,0)))
 
Last edited:
Upvote 0
Awesome, worked perfectly. I had a feeling I was screwing up the ranges but I couldn't figure it out. Also, I've gotten in the habit of using SUMIFS all the time because I like that the sum range comes first for some reason :). Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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