Search code examples
google-sheetscheckboxexcel-formulagoogle-sheets-formula

How to count checkboxes for a given date and paste it as number in a cell


I'm trying to develop a task management system where I need to check all the completed tasks for a given date.

Pls refer to the attached sheet.

When I check the box as complete (Column B), Column C automatically has to print the current date. For that I gave the equation: =if(B3=True,NOW(),"")

Each time a checkbox is checked, the date will be automatically added in column C.

But the real challenge is I also want to display the number of tasks I completed on a specific date in Column F. For that, I gave the equation: =COUNTIFs(B:B=true,C:C=E4)

But as you can see, the answer comes in zero. I even checked if the two dates are equal by checking: =if(E4=C4,True,False), and the answer came out False.

Although both the dates are equal, how come they are false? How can I solve this issue?

Screenshot


Solution

  • There are few changes, that you should do:-

    1. Use TODAY() instead of NOW() in your case, as NOW returns Time also, which is the making it showing false, so change this =if(B3=True,NOW(),"") to =if(B3=True,TODAY(),"").
    2. You're wrongly using COUNTIFS, so change this =COUNTIFs(B:B=true,C:C=E4) to =COUNTIFS(B:B,true,C:C,E4)

    Reference:-

    NOW()

    TODAY()

    COUNTIFS()