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
- 66.5K Get Help
- 433 Global Discussions
- 152 Industry Talk
- 494 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 506 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!