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
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!