counting date

Rgioff
Rgioff
edited 12/09/19 in Smartsheet Basics

How would I go about counting a column of dates and counting each by month and year? Ideally i would like the formula to scan an entire column for all dates in jan of 2018 and return a count of them.

 

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    =COUNTIFS([Date Column]:[Date Column], MONTH(@cell) = #, [Date Column]:[Date Column], YEAR(@cell) = #)

     

    Give this a try. Just replace the # with whatever month/year you need. You could also reference a cell and enter your month and year in the cell to avoid having to continuously edit the formula. If you were to put the Month in row one and the Year in row 2 of the Primary column, it would look something like this...

     

    =COUNTIFS([Date Column]:[Date Column], MONTH(@cell) = [Primary Column]1, [Date Column]:[Date Column], YEAR(@cell) = [Primary Column]2)

  • Brian W
    Brian W ✭✭

    Hey, Paul. I find that this only works with a specified range of cells, and then only if there are no blanks. Otherwise I get an #INVALID DATA TYPE error. Do you get the same error?