COUNTIFS with date parameters
Hello. I'm stumped with what should be a simple COUNTIFS formula. I need a count of records that meet all of this criteria in my "Medscheduler" Smartsheet:
1) AcademicYear = 2021-22 August 23, 2021-August 21, 2022
2) Date <= 03/27/22
3) Created <= 07/16/21
My formula is returning an #INVALID OPERATION error message:
=COUNTIFS({MedschedulerAcademicYear} = "2021-22 August 23, 2021-August 21, 2022", {MedschedulerDate} <= DATE(2022, 3, 27), {MedschedulerCreated} <= DATE(2021, 7, 16))
Any help would be greatly appreciated!
Mary
Best Answer
-
@Mary Ayers Did you try adding those commas to your formula?
Answers
-
Hi @Mary Ayers
Hope you are fine, Please add a copy of your sheet or a screenshot (after removing or replacing any sensitive information). This will make it easier for me to provide the appropriate answer to your question.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
Try this. It looks like you are just missing some commas in between your ranges and criteria.
=COUNTIFS({MedschedulerAcademicYear}, = "2021-22 August 23, 2021-August 21, 2022", {MedschedulerDate}, <= DATE(2022, 3, 27), {MedschedulerCreated}, <= DATE(2021, 7, 16))
-
Hi @Bassam Khalil , I have attached a screenshot. Thanks!
Mary
-
@Mary Ayers Did you try adding those commas to your formula?
-
@Paul Newcome Yes, I did. That did not solve the problem. Thanks!
-
That should be working. Hmm... Let's give this a shot...
=COUNTIFS({MedschedulerAcademicYear}, @cell = "2021-22 August 23, 2021-August 21, 2022", {MedschedulerDate}, @cell <= DATE(2022, 3, 27), {MedschedulerCreated}, DATEONLY(@cell) <= DATE(2021, 7, 16))
It may also have to do with the commas inside of your "specific text" string although I have tested that specific portion with no issue.
Do you have any blanks in your {MedschedulerDate} range? Is that error present in any of the three ranges?
-
Ugh... It had been two years since I wrote the original formulas and I had forgotten that I'd need to create a Sheet Reference for the new date fields I was trying to search on. It came to me in my sleep last night. Thank you for all the assistance in trying to solve this, @Paul Newcome and @Bassam Khalil. -Mary
-
Happy to help. 👍️
-
You are welcome, and happy dreams it's help :)
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!