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
- 66.7K Get Help
- 438 Global Discussions
- 152 Industry Talk
- 497 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 509 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!