MONTH formula when referencing another sheet doesn't like blanks.
I've got this formula:
=COUNTIFS({Improve system Range 2}, MONTH(@cell) = 1)
It counts how many dates in a specific month (January in this instance). However if I select the entire column, it errors (#INVALID DATA TYPE) as it can't handle blank cells.
Smartsheet by default puts a number of blank cells at the bottom of the grid, so there's no getting away from having blank cells.
Anyone know how I'd modify this formula to make it work so It can deal with blanks? I'd assume I'd need some kind of 'Ignore if <0' but I don't quite know how to do this.
Thanks!
Best Answer
-
I think I figured it out. Try this.
=COUNTIF({Improve system Range 2}, IFERROR(MONTH(@cell), 0) = 1)
Answers
-
Hi Graham,
Try below.
=COUNTIF({Improve system Range 2}, IFERROR(MONTH(@cell) = 1, " "))
When you have a chance, take a look at how the IFERROR function works. https://help.smartsheet.com/function/iferror
-
Unfortunately that doesn't work either, still get #INVALID DATA TYPE. I recall trying IFERROR before when I last tried and couldn't crack it for this formula.
-
I think I figured it out. Try this.
=COUNTIF({Improve system Range 2}, IFERROR(MONTH(@cell), 0) = 1)
-
Yes! That did it. Many thanks!
-
You're very welcome!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!