# Due in the next 7 days - Parent/children formula

Options
✭✭✭✭
edited 08/04/21

Hi all, I'm looking to create a formula that looks through the children of a parent and assesses whether it is due in the next seven days and then as a separate formula assesses which are overdue too.

Currently I have:

=COUNTIFS(CHILDREN([End Date]101), CHILDREN([% Complete]101) <> 1, AND(@cell >= TODAY(), @cell <= TODAY(7)))

I think the @cell my be messing it up but I'm not sure how to solve. Any help would be appreciated :)

• ✭✭✭✭✭✭
Options

The @cell references are as they should be. Your syntax is just a little off. For countifs it goes "range, criteria, range, criteria". You have "range, rangecriteria, criteria". So we need to reorder the portions as well as add a comma between the % Complete range and its criteria.

=COUNTIFS(CHILDREN([End Date]101), AND(@cell >= TODAY(), @cell <= TODAY(7)), CHILDREN([% Complete]101), <> 1)

• ✭✭✭✭
Options

ahhhh, amazing! Thank you so much Paul, that worked spot on. I think I was just having a moment

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!