Trouble with SUMPRODUCT & INDIRECT

rwells

New Member
Joined
Sep 21, 2016
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello!

I have a workbook that is organized by clients' names - one sheet for each letter of the alphabet.
Each sheet is identical, and tracks sales dates and amounts.

Named range for sheets = "sheets"
Dates in column A
Amounts in column B


I am looking to sum the total sales for each month - so basically I want to so a SUMIF, but across all sheets.
Need to set this up so that it can be used in the future - it needs to recognize not only the month, but the year as well.


I've not used it before, but I think I need to use SUMPRODUCT with INDIRECT. Am having trouble with the formatting.
Any help would be appreciated.

Thanks!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
This is how you could calculate it but it is a slow formula. See if it works ok.

=SUMPRODUCT(SUMIFS(INDIRECT("'"&Sheets&"'!B:B"),INDIRECT("'"&Sheets&"'!A:A"),">="&B1,INDIRECT("'"&Sheets&"'!A:A"),"<"&B2))

In this example you need a date in B1 that is the start of a month and another date in B2 that is the start of the next month.
 
Upvote 0
Then either in your sheets named range you have a cell that doesnt correspond to the name of one of your sheets or your are using a version of excel that doesnt have SUMIFS. Became available in 2007 version i believe.
 
Upvote 0
Hallelujah! I had a space in one of my sheet names. Thanks a bunch!
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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