countifs with a date criteria
I am trying to create a countifs formula that would count "New Quotes" with a January date while it's referencing another sheet.
New Quotes would be in the New Quote/Repricing column of this spreadsheet and then there's the Proposal date column that is in a MM/DD/YY format.
=COUNTIFS({CPI Prospects 2019 Range 1}, "New Quote", {CPI Prospects 2019 Range 2}MONTH(@cell),01)
Comments
-
Give this a try:
=COUNTIFS({CPI Prospects 2019 Range 1}, "New Quote", {CPI Prospects 2019 Range 2}, IFERROR(MONTH(@cell), 0) = 1)
-
You are my new best friend. Thank you so much!!!
-
No problem - happy to help. Glad it worked.
-
To expand on why this worked as opposed to your original formula:
Most immediately, you were missing a comma between your second range and criteria.
Secondly, if there are any blank cells or cells containing non-date data within your range, it will throw an error within the MONTH(@cell) function which in turn would cause the entire formula to fail. That is the reason for wrapping the MONTH(@cell) in the IFERROR statement.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!