Sumif transaction date falls into one Month of one Financial Year

Queeza

New Member
Joined
Jun 9, 2018
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello
I have a table of transactions, (ReflectReport), with multiple criteria columns. I have added a table column, (Fin Year) using
=IF(AND(MONTH([@Date])=MONTH(TODAY()),YEAR([@Date])=YEAR(TODAY())),"2","1")
1 equals last financial year and 2 equals this financial year.
Other columns, but not all, are:
DateAccomplishment CostRMMonthFin Year MonthCalendar MonthFin Year
03/Jul/2021​
1,569.00​
1Jul72
03/Jul/2020​
842.50​
1Jul71
06/Jul/2020​
1,569.00​
1Jul71
06/Jul/2020​
842.50​
1Jul71
Month uses: =IF([@Date]="","",CHOOSE(MONTH([@Date]),7,8,9,10,11,12,1,2,3,4,5,6))
Fin Year Month uses: =IF([@Date]="","",TEXT([@Date],"mmm"))
Calendar Month uses: =IF([@Date]="","",MONTH([@Date]))

I have another table, (TblActivity) with a column, "Spent This Month", that calculates spent this month by activity and schedule using:

=IFERROR(SUMIFS(ReflectReport[Accomplishment Cost],ReflectReport[Schedule],[@Schedule],ReflectReport[[Calendar Month ]],MONTH(TODAY()),ReflectReport[Activity],[@Activity]),"Check Dates")

I need this formula to use column "Date" to differentiate between the months of financial years, (and all the other criteria).
At the moment it is adding July 2020 and 2021 together.

Any help would be very much appreciated.

Thanks
Steve
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
For a very simple solution, I would add a helper column in your transaction table that stores both month and year in a single number
= Month(date) + Year(date)*12
so 03/Jul/2020 would be 7 + 2020*12 = 24247
Then your SUMIFS can look up the month for today with Month(Today()) + Year(Today())
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=IFERROR(SUMIFS(ReflectReport[Accomplishment Cost],ReflectReport[Schedule],[@Schedule],ReflectReport[Date],">"&EOMONTH(TODAY(),-1),ReflectReport[Date],"<="&EOMONTH(TODAY(),0),ReflectReport[Activity],[@Activity]),"Check Dates")
 
Upvote 0
For a very simple solution, I would add a helper column in your transaction table that stores both month and year in a single number
= Month(date) + Year(date)*12
so 03/Jul/2020 would be 7 + 2020*12 = 24247
Then your SUMIFS can look up the month for today with Month(Today()) + Year(Today())
Thank you
I had to add the *12 to the year in the SUMIF and then it worked perfectly.
 
Upvote 0

Forum statistics

Threads
1,214,921
Messages
6,122,280
Members
449,075
Latest member
staticfluids

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