Countifs with Year, Month - Date Column
Good afternoon,
I am using
countifs with the Month and Year functions and keep getting errors.
Is it because, in my 'Delivery Date' column, some rows have text like 'Canceled' & 'On Hole.' I would love to get some assistance as I have a large dashboard due at noon tomorrow.
=COUNTIFS({Store Type}, "New", {Parent Row}, 1, {Delivery Date}, AND(IFERROR(MONTH(@cell), 0), IFERROR(YEAR(@cell), 0) = 2023))
Answers
-
You are missing the comparison for the month in your formula. This makes is easier to visualize:
Here is the formula corrected to look for January 2023. The IFERROR()s will prevent the non-date entries from being an issue.
=COUNTIFS({Store Type}, "New", {Parent Row}, 1, {Delivery Date}, AND(IFERROR(MONTH(@cell), 0)= 1, IFERROR(YEAR(@cell), 0) = 2023))
-
@Carson Penticuff, thank you for your response. I added the comparison. However, It is still not working.
I have ran the formula multiple ways and now I am only getting an error when I add the YEAR function. Also, when I run the formula below, I am getting a '0' instead of and error in my cell.
=COUNTIFS({Store Type}, "New", {Parent Row}, 1, {Delivery Date}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))
-
Looking at your screenshot, it does not appear the formatting is consistent in your date column. Can you verify it is formatted as "date"?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 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!