Formula to count number of child rows that with dates that fall in last 60 days

Hello, I am working on a sheet and would like a "helper" column to provide me with a number in the parent row that counts to the number of child rows with a date (from the "Date Shared" column) that falls within the last 60 days.

The goal of this is so that I can pull a report that lists any rows that list dates in the last 60 days AS WELL AS the parents of those rows. If there is an easier way to report this, I am all ears.

I am not very familiar with formulas and have been trying out different things with no success.

Any advice on how to write this formula?



Answers

  • Linda Manduchova
    Linda Manduchova ✭✭✭✭

    Hello @ckritz -


    You could try the following formula:

    =COUNTIF(CHILDREN([Date Shared]:[Date Shared]), AND(@cell < TODAY(), @cell > TODAY(-60)))

    This will count all of the children's dates that fall under the criteria of the last 60 days.

    Hope this helps!


    Linda

  • Thank you! I tried that out and it didnt quite work but it gave me a starting point to play with. I ended up getting it right with:

    =COUNTIF(CHILDREN([Date Shared]@row), AND(@cell < TODAY(), @cell > TODAY(-60)))

    The original formula you with "[Date Shared]:[Date Shared]" was not pulling the correct result but [Date Shared]@row seems to be.

    Thanks again!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!