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
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!