Quick question about creating an IFERROR statement after an OR statement
Hey everyone,
Hopefully this is an easy question, though I'm having a hard time figuring this out! I'm trying to write a COUNTIFS statement that can be broken down into quarterly segments. I learned that an OR statement would allow me to include multiple months in the statement, but now I don't know how to properly include IFERROR(YEAR(@cell),0)=2022. I added it to the end of the below statement and got an error. Could someone help me finish this statement off so I can include the year? I'm still learning..
=COUNTIFS([End Date]:[End Date], OR(IFERROR(MONTH(@cell), 0) = 1, IFERROR(MONTH(@cell), 0) = 2, IFERROR(MONTH(@cell), 0) = 3))
Thank you so much!
Answers
-
So you can't have multiple conditions on the same range in COUNTIFS - you would need to do three COUNTIFS and add them together and IIRC, IFERROR is not able to be inside a COUNTIF. The COUNTIF wouldn't count the errors as those wouldn't match the conditions you would be using
Try this:
=COUNTIF([End Date]:[End Date], MONTH(@cell) = 1)+COUNTIF([End Date]:[End Date], MONTH(@cell) = 2)+COUNTIF([End Date]:[End Date], MONTH(@cell) = 3)
Kelly Drake (she/her/hers)
STARBUCKS COFFEE COMPANY| business optimization product manager
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!