Using SUMIFS with YEAR and MONTH from single referenced column
Hi all,
I'm trying to create sheet that will sum up all revenue for a year, by month. End result should look something like this:
I'm using this formula and receiving an #INCORRECT ARGUMENT SET error:
=SUMIFS({anrev}, {vehicl}, "Site", {Scale Date}, IFERROR(YEAR(@cell), 0) = 2020, IFERROR(MONTH(@cell), 0) = 1) (this is for Jan, I change Month = 2 for Feb, Month = 3 for Mar and so on)
where {anrev} is revenue, {vehicle} is a category column and {Scale Date} is the date reference column (in form MM/DD/YY), all referenced from another single sheet.
If I remove either Year or Month functions, the formula works so
=SUMIFS({anrev}, {vehicl}, "Site", {Scale Date}, IFERROR(MONTH(@cell), 0) = 1)
provides all revenue for Jan and
=SUMIFS({anrev}, {vehicl}, "Site", {Scale Date}, IFERROR(YEAR(@cell), 0) = 2020)
provides all revenue for 2020, but the combination of the two don't seem to work. Any help would be appreciated.
Best Answer
-
I think you just need to add the {Scale Date} to both parts like ...
=SUMIFS({anrev}, {vehicl}, "Site", {Scale Date}, IFERROR(YEAR(@cell), 0) = 2020, {Scale Date},IFERROR(MONTH(@cell), 0) = 1)
Answers
-
I think you just need to add the {Scale Date} to both parts like ...
=SUMIFS({anrev}, {vehicl}, "Site", {Scale Date}, IFERROR(YEAR(@cell), 0) = 2020, {Scale Date},IFERROR(MONTH(@cell), 0) = 1)
-
Hi Kimberly,
Yes that appears to work, thank you very much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!