Having Issue with "COUNTIF" returns "0"

Hi Guys, I have to count the status. Let's assume I have 5 different statuses (0,1,2,3,4) in another sheet. I have prepared a separate metric sheet to count the status specifically for a date range but I got the result as "0" for everything. I have tried to change the name to execute but that doesn't work. can you please help me to resolve this issue?

Formula Used

=COUNTIFS({sales}, >=DATE(2021, 1, 1), {sales}, <=DATE(2021, 3, 31), {sales}, Labels@row)

Labels@row - Have the status (0,1,2,3,4)


  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    Hi @Aravind

    Hope you are fine, do you want to count for each status ( for example count for status "2" , in that date range between (1/1/2021 To 31/3/2021 ) if so then the formula will be as follows:

    =COUNTIFS({sales}, @cell > DATE(2021, 1, 1), {sales}, @cell < DATE(2021, 3, 31), {Labels}, "2")

    PMP Certified


    ☑️ 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"

  • Thanks for responding Bassam, I have executed the suggested formula and I got the result as "#Incorrect Argument". The thing is we have to count the Label items "1" in the same sheet which we have for reference. we need to count them accordingly by referencing another sheet?

  • Malaina Hudson
    Malaina Hudson ✭✭✭✭✭

    Hi, @Aravind ,

    Can you show a screenshot of your headers in the sheet where you are counting and the secondary sheet where your range is located? I don't need to see your real data - it's okay to redact or put in a couple of lines of sample data as reference. I have two or three ways I do similar summaries, but the layout of the range that's being referenced can influence the outcome and I can't tell which one might be better for you. :)

  • Hi, @Malaina Hudson

    Sure, Thanks for helping me

    Screenshot - 1

    Screenshot - 2

  • Heather Duff
    Heather Duff ✭✭✭✭✭✭

    Hi @Aravind ,

    It looks like your third argument in your formula - {stages range 1}, Labels@row - is referencing the same range as the dates arguments. You'll want to be sure you've selected the Status column from your source sheet as the range for that third argument.

    Hope this helps!



  • Malaina Hudson
    Malaina Hudson ✭✭✭✭✭

    Hi, @Aravind ,

    @Heather D has the right of it. You'll need to reference the status column for the third argument. This will mean that you need to identify a {stages range 2} that is looking at the Status column.

  • Hi @Heather D & @Malaina Hudson thanks for helping me guys. I'm trying to figure out the correct formula to count the status between a particular date range by referring to another sheet.

    Screenshot - 1 (Referencing the date)

    Screenshot - 2 (Referencing the Status)

    Screenshot - 3 (Counting between particular date range to display the count of status for the specified date range)

    Got Incorrect argument error. can you guys help me to resolve this one?

  • Hi @Bassam.M Khalil

    Thanks a lot @Bassam.M Khalil I tried it again with the name of the cell it populated the count thank you so much

  • Hi @Heather D & @Malaina Hudson

    Thanks for taking effort to resolve the sheet formula.

    With regards,


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!