sum between 2 dates not working

cmacnab

Board Regular
Joined
Jun 24, 2013
Messages
57
Office Version
  1. 2016
Platform
  1. Windows
Hi, I am trying to sum some data from another tab by week using start dates and end date in 2 different columns. For some reason the sums are not working so I'm not sure what is wrong with my formulas. It is definately the dates part of the formula that is not working. If I break down the formula, I can sum all the data but as soon as I add the dates in, I get no results. The references to the other tab are correct.
2f07b95c-c74e-41bc-87ce-a1eec401c389-canada.csv
ABCD
1Store NameStart DateEnd DateSales (incl. taxes) AR
2Pizza Parlour (VR)28-Sep-204-Oct-20$ -
3Pizza Parlour (VR)5-Oct-2011-Oct-20$ -
4Pizza Parlour (VR)12-Oct-2018-Oct-20$ -
5Pizza Parlour (VR)19-Oct-2025-Oct-20$ -
6Pizza Parlour (VR)26-Oct-201-Nov-20$ -
7Pizza Parlour (VR)2-Nov-208-Nov-20$ -
8Pizza Parlour (VR)9-Nov-2015-Nov-20$ -
9Pizza Parlour (VR)16-Nov-2022-Nov-20$ -
10Pizza Parlour (VR)23-Nov-2029-Nov-20$ -
11Pizza Parlour (VR)30-Nov-206-Dec-20$ -
12Pizza Parlour (VR)7-Dec-2013-Dec-20$ -
13Pizza Parlour (VR)14-Dec-2020-Dec-20$ -
14Pizza Parlour (VR)21-Dec-2027-Dec-20$ -
15Pizza Parlour (VR)28-Dec-203-Jan-21$ -
16Pizza Parlour (VR)4-Jan-2110-Jan-21$ -
17Pizza Parlour (VR)11-Jan-2117-Jan-21$ -
18Pizza Parlour (VR)18-Jan-2124-Jan-21$ -
19Pizza Parlour (VR)25-Jan-2131-Jan-21$ -
20Pizza Parlour (VR)1-Feb-217-Feb-21$ -
21Pizza Parlour (VR)8-Feb-2114-Feb-21$ -
22Pizza Parlour (VR)15-Feb-2121-Feb-21$ -
23Pizza Parlour (VR)22-Feb-2128-Feb-21$ -
24Pizza Parlour (VR)1-Mar-217-Mar-21$ -
25Pizza Parlour (VR)8-Mar-2114-Mar-21$ -
26Pizza Parlour (VR)15-Mar-2121-Mar-21$ -
27Pizza Parlour (VR)22-Mar-2128-Mar-21$ -
28Pizza Parlour (VR)29-Mar-214-Apr-21$ -
29Pizza Parlour (VR)5-Apr-2111-Apr-21$ -
30Pizza Parlour (VR)12-Apr-2118-Apr-21$ -
31Pizza Parlour (VR)19-Apr-2125-Apr-21$ -
32Pizza Parlour (VR)26-Apr-212-May-21$ -
33Pizza Parlour (VR)3-May-219-May-21$ -
34Pizza Parlour (VR)10-May-2116-May-21$ -
35Pizza Parlour (VR)17-May-2123-May-21$ -
36Pizza Parlour (VR)24-May-2130-May-21$ -
37Pizza Parlour (VR)31-May-216-Jun-21$ -
38Pizza Parlour (VR)7-Jun-2113-Jun-21$ -
39Pizza Parlour (VR)14-Jun-2120-Jun-21$ -
40Pizza Parlour (VR)21-Jun-2127-Jun-21$ -
Summary A&J
Cell Formulas
RangeFormula
D10:D40,D2:D8D2=SUMIFS('2f07b95c-c74e-41bc-87ce-a1eec40'!$W:$W,'2f07b95c-c74e-41bc-87ce-a1eec40'!$A:$A,$A2,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,">=&$B2",'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,"<='Summary A&J'!&$C2")
D9D9=SUMIFS('2f07b95c-c74e-41bc-87ce-a1eec40'!$W:$W,'2f07b95c-c74e-41bc-87ce-a1eec40'!$A:$A,$A9,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,">=&B9",'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,"<=&'Summary A&J'!C9")
Named Ranges
NameRefers ToCells
'2f07b95c-c74e-41bc-87ce-a1eec40'!_FilterDatabase='2f07b95c-c74e-41bc-87ce-a1eec40'!$A$1:$BI$25101D2:D40


Can someone help with this? Thank you.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You need to take the cell reference out of the quotes like
Excel Formula:
=SUMIFS('2f07b95c-c74e-41bc-87ce-a1eec40'!$W:$W,'2f07b95c-c74e-41bc-87ce-a1eec40'!$A:$A,$A2,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,">="&$B2,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,"<="&$C2)
 
Upvote 0
Solution
You need to take the cell reference out of the quotes like
Excel Formula:
=SUMIFS('2f07b95c-c74e-41bc-87ce-a1eec40'!$W:$W,'2f07b95c-c74e-41bc-87ce-a1eec40'!$A:$A,$A2,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,">="&$B2,'2f07b95c-c74e-41bc-87ce-a1eec40'!$E:$E,"<="&$C2)
I changed the name of the data sheet as I think that was causing problems. As I mentioned, if I remove the dates from the formula, I can get a sum for all of the data. Once I add in the dates, no results.

No dates version.
2f07b95c-c74e-41bc-87ce-a1eec401c389-canada.csv
ABCD
1Store NameStart DateEnd DateSales (incl. taxes) AR
9Anton & James Pizza Parlour (VR)16-Nov-2022-Nov-20$ 20,543.20
Summary A&J
Cell Formulas
RangeFormula
D9D9=SUMIFS(Data!$W:$W,Data!$A:$A,$A9)
Named Ranges
NameRefers ToCells
Data!_FilterDatabase=Data!$A$1:$BI$25101D9


Version with dates referenced in the formula
2f07b95c-c74e-41bc-87ce-a1eec401c389-canada.csv
ABCD
1Store NameStart DateEnd DateSales (incl. taxes) AR
2Anton & James Pizza Parlour (VR)28-Sep-204-Oct-20$ -
3Anton & James Pizza Parlour (VR)5-Oct-2011-Oct-20$ -
4Anton & James Pizza Parlour (VR)12-Oct-2018-Oct-20$ -
5Anton & James Pizza Parlour (VR)19-Oct-2025-Oct-20$ -
6Anton & James Pizza Parlour (VR)26-Oct-201-Nov-20$ -
7Anton & James Pizza Parlour (VR)2-Nov-208-Nov-20$ -
8Anton & James Pizza Parlour (VR)9-Nov-2015-Nov-20$ -
9Anton & James Pizza Parlour (VR)16-Nov-2022-Nov-20$ -
10Anton & James Pizza Parlour (VR)23-Nov-2029-Nov-20$ -
Summary A&J
Cell Formulas
RangeFormula
D10,D2:D8D2=SUMIFS(Data!$W:$W,Data!$A:$A,$A2,Data!$E:$E,">=&$B2",Data!$E:$E,"<='Summary A&J'!&$C2")
D9D9=SUMIFS(Data!$W:$W,Data!$A:$A,$A9,Data!$E:$E,">=&B9",Data!$E:$E,"<=&C9")
Named Ranges
NameRefers ToCells
Data!_FilterDatabase=Data!$A$1:$BI$25101D2:D10


I don't know if maybe it's not understanding the dates in the data or in the summary page which I'm showing. :(
 
Upvote 0
Did you try what I suggested?
 
Upvote 0
That is not what I suggested. Try looking at the modified formula I provided.
 
Upvote 0
Thank you, I missed the quotation marks on the date. Thank you for your help.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,956
Latest member
JPav

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