SUMIFS - FAILURE TO RECOGNISE DOUBLE DIGIT NUMERICAL CRITERIA

Gerry Hunt

New Member
Joined
Apr 10, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Can somebody help please?
I am using SUMIFS to collect financial information related to my Home Accounts into a 'Summary of Accounts' worksheet from 6 different Excel worksheets ['Account Bank Statements'].
Each worksheet is examined by SUMIFS to extract the 'Value' related to 64 different Categories of Expenditure (Account Codes) and the related 'Month Number' [i.e. 1-12 (Jan to Dec)]. The result is a month by month presentation of income and expenditure related to all 64 Account Codes.
The formula train given below works perfectly for Months 1 - 9 [i.e. Jan to Sep] but refuses to work for months 10-12 (Oct - Dec) - i.e a "double digit" rather than 'single digit' month number - in this case it merely returns zeroes. The formula train below is for "October" i.e Month "10" [second given criteria] and is applied in the 'Summary of Accounts' Sheet to each Category of Income/Expenditure [Account Code]. In this October example it points Account Code "$C9" in the Summary sheet. I do hope this is sufficiently clear information to permit some kind person to propose a solution to this problem - Thank you in anticipation.

=SUMIFS('JOINT CURRENT'!$D$6:$D$2000,'JOINT CURRENT'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'JOINT CURRENT'!$K$6:$K$2000,10)
+SUMIFS(CASH!$D$6:$D$2000,CASH!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,CASH!$K$6:$K$2000,10)
+SUMIFS('NATWEST CC'!$H$7:$H$2000,'NATWEST CC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'NATWEST CC'!$L$7:$L$2000,10)
+SUMIFS('M&S CC'!$D$7:$D$2000,'M&S CC'!$H$7:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'M&S CC'!$K$7:$K$2000,10)
+SUMIFS('HALIFAX CC'!$D$6:$D$2000,'HALIFAX CC'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'HALIFAX CC'!$K$6:$K$2000,10)
+SUMIFS('WISE DC'!$H$7:$H$2000,'WISE DC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'WISE DC'!$M$7:$M$2000,10)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
=SUMIFS('JOINT CURRENT'!$D$6:$D$2000,'JOINT CURRENT'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'JOINT CURRENT'!$K$6:$K$2000,10)
+SUMIFS(CASH!$D$6:$D$2000,CASH!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,CASH!$K$6:$K$2000,10)
+SUMIFS('NATWEST CC'!$H$7:$H$2000,'NATWEST CC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'NATWEST CC'!$L$7:$L$2000,10)
+SUMIFS('M&S CC'!$D$7:$D$2000,'M&S CC'!$H$7:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'M&S CC'!$K$7:$K$2000,10)
+SUMIFS('HALIFAX CC'!$D$6:$D$2000,'HALIFAX CC'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'HALIFAX CC'!$K$6:$K$2000,10)
+SUMIFS('WISE DC'!$H$7:$H$2000,'WISE DC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'WISE DC'!$M$7:$M$2000,10)
There can be a better workaround to your problem. Just want to have a look at how you are handling (inputting) dates in your various sheets.

Share a screenshot of the same to understand and help you better
 
Upvote 0
Thanks for your response. As you will appreciate, I don't wish to show the full detail of my personal financial accounting on-line but I hope the following extract from my Current Account worksheet will prove useful. The month number is derived from the item entry date as follows: "=IF(A7="","",MONTH(A7))". I looked at XL2BB - this cannot be added without exiting Protected Mode. A Microsoft warning indicated that it did not trust the source code. Are you able to help further with this?
Best regards.

DateTypeDescriptionValueBalanceAccount CodeNotesTagsMonth
01/01/2022​
OPENING BALANCE
4,967.36​
4,967.36​
1.1
04/01/2022​
DPCP SM MAYNARD , G C HUNT , VIA MOBILE - PYMT , FP 03/01/22 10 , 17093232160609000N
-72.59​
4,894.774.4Lunch at Five Arows1
04/01/2022​
DPCP SM MAYNARD , G C HUNT , VIA MOBILE - PYMT , FP 03/01/22 10 , 17093232160609000N
-26.59​
4,868.187.1Waddesdon Gift Shop Port and Wine1
04/01/2022​
DPCP SM MAYNARD , G C HUNT , VIA MOBILE - PYMT , FP 03/01/22 10 , 17093232160609000N
-15.79​
4,852.3911.3Waddesdon Gift Shop Cards1
04/01/2022​
POS3410 31DEC21 C , BOOTS,BERKHAMSTED , BERKHAMSTED GB
-6.49​
4,845.9010.1Mouth Ulcer Lotion1
04/01/2022​
POS3410 31DEC21 C , WAITROSE 223 , BERKHAMSTED GB
-4.50​
4,841.407.1Groceries1
04/01/2022​
POS3410 03JAN22 C , TESCO STORE 3309 , TRING GB
-27.04​
4,814.367.1Groceries1
04/01/2022​
D/DE.ON NEXT
-226.00​
4,588.3614.2Energy1
04/01/2022​
D/DDORS&SOM AA
-4.34​
4,584.0212.1Charity1
04/01/2022​
D/DSMILE TRAIN
-12.50​
4,571.5212.1Charity1
 
Upvote 0
in SUMIFS rather than putting a number for month make it more dynamic.
Underneath is a small extract from my file where I keep everything dynamic. And shall explain below how to do that with your formula.

All Records.xlsb
Y
61Date
62Oct-2022
63Sep-2022
64Aug-2022
65Jul-2022
66Jun-2022
67May-2022
Bank
Cell Formulas
RangeFormula
Y62Y62=EOMONTH(TODAY(),-1)+1
Y63Y63=EOMONTH(TODAY(),-2)+1
Y64Y64=EOMONTH(TODAY(),-3)+1
Y65Y65=EOMONTH(TODAY(),-4)+1
Y66Y66=EOMONTH(TODAY(),-5)+1
Y67Y67=EOMONTH(TODAY(),-6)+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
Y62:Y80,Y84:Y102Dates Occurringthis monthtextNO


So with your formula -
=SUMIFS('JOINT CURRENT'!$D$6:$D$2000,'JOINT CURRENT'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'JOINT CURRENT'!$K$6:$K$2000,10)
+SUMIFS(CASH!$D$6:$D$2000,CASH!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,CASH!$K$6:$K$2000,10)
+SUMIFS('NATWEST CC'!$H$7:$H$2000,'NATWEST CC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'NATWEST CC'!$L$7:$L$2000,10)
+SUMIFS('M&S CC'!$D$7:$D$2000,'M&S CC'!$H$7:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'M&S CC'!$K$7:$K$2000,10)
+SUMIFS('HALIFAX CC'!$D$6:$D$2000,'HALIFAX CC'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'HALIFAX CC'!$K$6:$K$2000,10)
+SUMIFS('WISE DC'!$H$7:$H$2000,'WISE DC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'WISE DC'!$M$7:$M$2000,10)

If we can put dynamic dates in Column Say E9 and below - Just like in Y62 and below in my XL2BB

then your formula can become -

Excel Formula:
=SUMIFS('JOINT CURRENT'!$D$6:$D$2000,'JOINT CURRENT'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'JOINT CURRENT'!$K$6:$K$2000,">="&E9,JOINT CURRENT'!$K$6:$K$2000,"<="&EOMONTH(E9,0))
+SUMIFS(CASH!$D$6:$D$2000,CASH!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,CASH!$K$6:$K$2000,">="&E9,CASH!$K$6:$K$2000,">="&EOMONTH(E9,0))
+SUMIFS('NATWEST CC'!$H$7:$H$2000,'NATWEST CC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'NATWEST CC'!$L$7:$L$2000,">="&E9,'NATWEST CC'!$L$7:$L$2000,">="&EOMONTH(E9,0))
+SUMIFS('M&S CC'!$D$7:$D$2000,'M&S CC'!$H$7:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'M&S CC'!$K$7:$K$2000,">="&E9,'M&S CC'!$K$7:$K$2000,">="&EOMONTH(E9,0))
+SUMIFS('HALIFAX CC'!$D$6:$D$2000,'HALIFAX CC'!$H$6:$H$2000,'SUMMARY OF ACCOUNTS'!$C9,'HALIFAX CC'!$K$6:$K$2000,">="&E9,'HALIFAX CC'!$K$6:$K$2000,">="&EOMONTH(E9,0))
+SUMIFS('WISE DC'!$H$7:$H$2000,'WISE DC'!$J$7:$J$2000,'SUMMARY OF ACCOUNTS'!$C9,'WISE DC'!$M$7:$M$2000,">="&E9,'WISE DC'!$M$7:$M$2000,">="&EOMONTH(E9,0))
 
Upvote 0
Solution
Dear Sanjay Gulati Musafir - Very many thanks for your input to my problem and your proposed solution. Having looked at my business further, I have decided to move away from extensive use of SUMIFS and to move to using Pivot Tables. Accordingly, I am closing down this problem. All the very best and thank you again. Gerry Hunt.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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