Sumproduct, Sum on running date

Cferron

New Member
Joined
May 20, 2011
Messages
44
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Hello community,

I would like to dynamically sum a rage of cells based on a start date.
The start date is basically =Today()
End date is today + 6

These SUM would be summarize in a table. I have use the SUM to crate the "base" table, but again, I would like it to be dynamic based on the date.

I was thinking about a SUMPRODUCT using an array, but I'm not to familiar with programming those.

Any ideas welcome!

Quarts-test.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAAB
1Dates
2RégionsVillesSecteursUniquenameHlookup10/5/2211/6/2211/7/2211/8/2211/9/2211/10/2211/11/2211/12/2211/13/2211/14/2211/15/22
3SUDVictoSNT COVSUDVictoSNT COV2N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
4SUDVictoBrigade COV 5-11 ansSUDVictoBrigade COV 5-11 ans322222222222
5SUDVictoMobile COVIDSUDVictoMobile COVID411111111111
6SUDVictoSADSUDVictoSAD500000000000
7SUDVictoCDDSUDVictoCDD600000000000
8SUDVictoCDD MobileSUDVictoCDD Mobile700000000000
9SUDFortierSNT COVSUDFortierSNT COV800000000000
10SUDFortierBrigade COV 5-11 ansSUDFortierBrigade COV 5-11 ans900000000000
11SUDFortierMobile COVIDSUDFortierMobile COVID1000000000000
12SUDFortierSADSUDFortierSAD1100000000000
13SUDFortierCDDSUDFortierCDD1200000000000
14SUDFortierCDD MobileSUDFortierCDD Mobile1300000000000
15SUDDrummondSNT COVSUDDrummondSNT COV1400000000000Total 7 jours
16SUDDrummondBrigade COV 5-11 ansSUDDrummondBrigade COV 5-11 ans1500000000000Du10/5/22au10/11/22
17SUDDrummondMobile COVIDSUDDrummondMobile COVID1600000000000
18SUDDrummondSADSUDDrummondSAD1700000000000SecteursVictoFortiervilleDRLa TuqueSt-TiteShawi3RBNYLouiseville
19SUDDrummondCDDSUDDrummondCDD1800000000000SNT COV00000070077
20SUDDrummondCDD MobileSUDDrummondCDD Mobile19100100100100100100100100100100100Brigade COV 5-11 ans14001400777
21NORDLa TuqueSNT COVNORDLa TuqueSNT COV20N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AMobile COVID700700777
22NORDLa TuqueBrigade COV 5-11 ansNORDLa TuqueBrigade COV 5-11 ans2122222222222SAD000000777
23NORDLa TuqueMobile COVIDNORDLa TuqueMobile COVID2211111111111CDD000000777
24NORDLa TuqueSADNORDLa TuqueSAD2300000000000CDD Mobile0070000700777
25NORDLa TuqueCDDNORDLa TuqueCDD2400000000000
26NORDLa TuqueCDD MobileNORDLa TuqueCDD Mobile2500000000000
27NORDSt-TiteSNT COVNORDSt-TiteSNT COV2600000000000
28NORDSt-TiteBrigade COV 5-11 ansNORDSt-TiteBrigade COV 5-11 ans2700000000000
29NORDSt-TiteMobile COVIDNORDSt-TiteMobile COVID2800000000000
30NORDSt-TiteSADNORDSt-TiteSAD2900000000000
31NORDSt-TiteCDDNORDSt-TiteCDD3000000000000
32NORDSt-TiteCDD MobileNORDSt-TiteCDD Mobile3100000000000
33NORDShawiSNT COVNORDShawiSNT COV3200000000000
34NORDShawiBrigade COV 5-11 ansNORDShawiBrigade COV 5-11 ans3300000000000
35NORDShawiMobile COVIDNORDShawiMobile COVID3400000000000
36NORDShawiSADNORDShawiSAD3500000000000
37NORDShawiCDDNORDShawiCDD3600000000000
38NORDShawiCDD MobileNORDShawiCDD Mobile37100100100100100100100100100100100
39CENTRE3RSNT COVCENTRE3RSNT COV38100100100100100100100100100100100
40CENTRE3RBrigade COV 5-11 ansCENTRE3RBrigade COV 5-11 ans3911111111111
41CENTRE3RMobile COVIDCENTRE3RMobile COVID4011111111111
42CENTRE3RSADCENTRE3RSAD4111111111111
43CENTRE3RCDDCENTRE3RCDD4211111111111
44CENTRE3RCDD MobileCENTRE3RCDD Mobile4311111111111
45CENTREBNYSNT COVCENTREBNYSNT COV4411111111111
46CENTREBNYBrigade COV 5-11 ansCENTREBNYBrigade COV 5-11 ans4511111111111
47CENTREBNYMobile COVIDCENTREBNYMobile COVID4611111111111
48CENTREBNYSADCENTREBNYSAD4711111111111
49CENTREBNYCDDCENTREBNYCDD4811111111111
50CENTREBNYCDD MobileCENTREBNYCDD Mobile4911111111111
51CENTRELouisevilleSNT COVCENTRELouisevilleSNT COV5011111111111
52CENTRELouisevilleBrigade COV 5-11 ansCENTRELouisevilleBrigade COV 5-11 ans5111111111111
53CENTRELouisevilleMobile COVIDCENTRELouisevilleMobile COVID5211111111111
54CENTRELouisevilleSADCENTRELouisevilleSAD5311111111111
55CENTRELouisevilleCDDCENTRELouisevilleCDD5411111111111
56CENTRELouisevilleCDD MobileCENTRELouisevilleCDD Mobile5511111111111
Feuil1
Cell Formulas
RangeFormula
U16U16=TODAY()
W16W16=U16+6
T19:T24T19=SUM(F3:L3)
U19:U24U19=SUM(F9:L9)
V19:V24V19=SUM(F15:L15)
W19:W24W19=SUM(F21:L21)
X19:X24X19=SUM(F27:L27)
Y19:Y24Y19=SUM(F33:L33)
Z19:Z24Z19=SUM(F39:L39)
AA19:AA24AA19=SUM(F45:L45)
AB19:AB24AB19=SUM(F51:L51)
D3:D56D3=CONCAT(A3,B3,C3)
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Just did that.
I have access to several version or platform.
Excel Online (both mac and PC) - (English environnement)
Excel 2019 PC (French canadian environnement)
Excel 16.6 Mac (French canadian environnement)
 
Upvote 0
Which does this need to work with?
 
Upvote 0
How about
Excel Formula:
=SUMPRODUCT(($F$2:$P$2>=$U$16)*($F$2:$P$2<=$W$16),F3:P3)
 
Upvote 0
Solution
It is working perfectly! Thanks a million!
 
Last edited:
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
I can't seem to be able to delete my post.
Initially I thought it was not working, but I noticed I had an issue with my dates in the main table.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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