Looking for help with countif formula
I'm having some trouble with a countif formula, looking for some assistance.
My goal here is to count the number of time the Created Date is last month and that the service type is "Trade Database - Add Part Number(s)"
When I enter the formula below it works great!
=IF(MONTH(TODAY()) = 1, COUNTIFS({Genie Archive Created Date}, IFERROR(MONTH(@cell), 0) = 12, {Genie Archive Created Date}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - 1), COUNTIFS({Genie Archive Created Date}, IFERROR(MONTH(@cell), 0) = MONTH(TODAY()) - 1, {Genie Archive Created Date}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))), {Genie Archive Service Type}, "Trade Database - Add Part Number(s)"
I now need to add the following to the above
{Genie Archive Service Type}, "Trade Database - Add Part Number(s)"
I tied the two of them together as follows:
=IF(MONTH(TODAY()) = 1, COUNTIFS({Genie Archive Created Date}, IFERROR(MONTH(@cell), 0) = 12, {Genie Archive Created Date}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - 1), COUNTIFS({Genie Archive Created Date}, IFERROR(MONTH(@cell), 0) = MONTH(TODAY()) - 1, {Genie Archive Created Date}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))), {Genie Archive Service Type}, "Trade Database - Add Part Number(s)")
When I do I get an UNPARSABLE error message.
Best Answer
-
Try this one...
=COUNTIFS({Genie Archive Service Type}, "Trade Database - Add Part Number(s)", {Genie Archive Created Date}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - IF(MONTH(TODAY()) = 1, 1)))
Answers
-
Hi JP
If I've counted the brackets correctly, I think one of the closing brackets after the last TODAY function needs to be deleted.
e.g., try replacing YEAR(TODAY()))) with YEAR(TODAY())) and see how that goes?
Hope this helps and that you have a great day,
Jason Albrecht MBA, MBus(AppFin), DipFinMgt
LinkedIn profile - Open to work
-
Unfortunately not the solution
-
Try this one...
=COUNTIFS({Genie Archive Service Type}, "Trade Database - Add Part Number(s)", {Genie Archive Created Date}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY()) - IF(MONTH(TODAY()) = 1, 1)))
-
Thank you Paul!
I have so much to learn yet, but excited to do so. You and the others have been an amazing asset in this community.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!