Calculating Month from Date Column
Hello,
I am looking for help with the formula below. I am referencing another sheet and trying to calculate the number of rows that fall within January in the 'Milestone Due Date' column. The dates in the 'Milestone Due Date' column displayed in the following format: mm/dd/yy.
=COUNTIFS({Project}, [Primary Column]@row, {Milestone Due Date}, =MONTH(1))
Appreciate any help anyone can provide.
Thanks!
Andrea
Comments
-
Brian,
In regards to your note, the reason may be because there are blank cells in your column. Try wrapping the MONTH statement in an IFERROR statement. Something along the lines of...
IFERROR(MONTH(@cell) = 1, 0)
What this will do is if there is an error within any cell the MONTH function is looking at (to include blanks), it will replace that with 0. Because 0 is a number, it will negate the error of a blank cell (or non-date value) and allow your formula to continue working. The other nice thing is that there is no month 0, so you don't have to worry about it inadvertently being included in other calculations.
-
Thanks Brian. This worked like a charm!
-
Thanks Paul. This is a great workaround.
-
Happy to help. I learned this one the hard way... Haha
-
Brian & Paul -
Is there also a way to exclude anything that is not in 2019 in this same formula?
Thanks!
Andrea
-
Fantastic! Thank you for your help, Paul!
-
No worries. Happy to help!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!