Why didn't my original CountIF formula work?
I am trying to count the number of projects that began since Jan 1, 2024. I typed in the formula =COUNTIF([Start Date]:[Start Date], ">= Jan 1, 2024"). Basically I wanted to count the number of projects with a start date that were equal to Jan 1, 2024 or greater. However that formula gave the blatantly incorrect answer.
Using Smartsheet AI they gave me this formula =COUNTIF([Start Date]:[Start Date], >=DATE(2024, 1, 1)) which gave the correct answer.
But I still have no clue why the original formula I wrote didn't work. Can someone help me out? Thanks!
Answers
-
The original formula is comparing a date to text, "Jan 1, 2024". Date(2024,1,1) works because it is a date.
-
@dojones ok makes sense, how come though it still provided an answer? The column I was using was a Date field column, yet the original formula still counted '2,' curious as to why that happened?
Thanks for answering!
-
@RL5500
If there is something in your column that begins with K,L,M,N, … it will count that. Maybe a few fields are entered as a word. Change field to Date Only and see if it changes to 0 for count.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!