How to write a count formula that spans multiple years and has blanks?

I have a client list that has columns for Contract Status, Contract Start, and Contract End date. It spans a few years now and want to count how many clients I had during each year, possibly each quarter. Some of my contracts span several years, and others have no close date because they are long-term or active projects. I can see what I'm looking for in Gantt View, but I can't think of the best way to write a formula that takes all conditions into account.

Please see screenshots. Any advice on how to write this?


Answers

  • Razetto
    Razetto ✭✭✭✭✭✭

    @NickAC You can set up a sheet with columns for each quarter and use a countifs function that uses a month range like for Q1 in 2023, countif({Contract Date }, YEAR(@cell) = 2023, {Contract Date}, MONTH(@cell) = 1)+ countif({Contract Date }, YEAR(@cell) = 2023, {Contract Date}, MONTH(@cell) = 2)+countif({Contract Date }, YEAR(@cell) = 2023, {Contract Date}, MONTH(@cell) = 3). If you wanted to see which ones are active or not then i could add that as a criteria to the formula. Hope this helps!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!