Calculate MTD with Sumif SumProduct Indirect

leighnea

New Member
Joined
Jul 25, 2009
Messages
18
=SUMPRODUCT(SUMIF(INDIRECT("'"&list&"'!d2:d100"),D11,INDIRECT("'"&list&"'!e2:e100")))


This is the formula I used and this adds all 31 tabs however I need to sum only based on what day the report is being ran for.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
20,225
Office Version
  1. 365
Platform
  1. Windows
How are the sheets named? If, for example, the sheets are named 1, 2, 3, etc., try...

=SUMPRODUCT(SUMIF(INDIRECT("'"&ROW(INDIRECT("1:"&DAY(TODAY())))&"'!D2:D100"),D11,INDIRECT("'"&ROW(INDIRECT("1:"&DAY(TODAY())))&"'!E2:E100")))

If the sheets are named Sep 1, Sep 2, Sep 3, etc., replace...

ROW(INDIRECT("1:"&DAY(TODAY())))

with

TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),ROW(INDIRECT("1:"&DAY(TODAY())))),"mmm d")

If the sheets are named 09/01/14, 09/02/14, 09/03/14, etc., replace...

ROW(INDIRECT("1:"&DAY(TODAY())))

with

TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),ROW(INDIRECT("1:"&DAY(TODAY())))),"mm/dd/yy")

Hope this helps!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,098
Messages
5,835,368
Members
430,353
Latest member
GS90

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
Top