Use countifs to count all projects with a quarter date and year from a date column

Mathew Palter
Mathew Palter ✭✭✭✭

my current formula is =countifs({sheet reference}, ROUNDUP(MONTH(@cell)/3) = "4", {sheet reference}, Year(@cell) = "2022"


I have ensured the column from the reference is a date column, however I am given invalid data type as an error

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    edited 04/19/23 Answer βœ“

    It sounds like you may have blanks and/or non-date values in the date column. Try a couple of IFERRORS like so:

    =countifs({sheet reference}, ROUNDUP(IFERROR(MONTH(@cell), 0)/3) = "4", {sheet reference}, IFERROR(Year(@cell), 0) = "2022"

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    edited 04/19/23 Answer βœ“

    It sounds like you may have blanks and/or non-date values in the date column. Try a couple of IFERRORS like so:

    =countifs({sheet reference}, ROUNDUP(IFERROR(MONTH(@cell), 0)/3) = "4", {sheet reference}, IFERROR(Year(@cell), 0) = "2022"

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!