Why didn't my original CountIF formula work?

Options
RL5500
RL5500 ✭✭✭

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

  • dojones
    dojones ✭✭✭✭✭

    The original formula is comparing a date to text, "Jan 1, 2024". Date(2024,1,1) works because it is a date.

  • RL5500
    RL5500 ✭✭✭

    @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!

  • dojones
    dojones ✭✭✭✭✭

    @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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!