Formula to count child rows that have not expired
Hi all,
I have a sheet that contains parent and child rows. Each child row has an expiration date and I want to count the number of child rows that have not expired based on the expiration date in that row. Can you assist? Thanks!
Answers
-
You should be able to use this formula in the parent row. You might need to give it a reference if you're putting the formula on a different column than the dates. Something like this:
=COUNTIF(CHILDREN(Date@row), <TODAY())
-
Thanks David. Yes, I have a column titled active engagements that will count the number of engagements (which are listed as child rows) that have NOT expired so it sounds like I will need a reference. Can you help with with the (date@row) part?
-
I may be confused about exactly what you're doing. The formula that I used essentially makes a formula on the Parent row on say the Formula column. But it uses the CHILDREN function to look at all of the child rows on the Date column to check the date. So you'll need to replace Date@row to whatever the column name that contains your date.
If you're looking to check a few things, like the fact that the date is before today AND that the number is greater than 0, then you'll need COUNTIFS. Or if you're looking to add up a different column based on the results in one column, then you're looking for SUMIF. It would look like:
=SUMIF([The column you would use to add the numbers up], [the condition column like Date], < TODAY())
-
I'm including a snapshot of what I'm trying to do. I appreciate your help with this.
In the 'Total Active Engagements' column, I'd like the formula to count the child rows that have not expired, based on the date in that column. So if the date in the Engagement Expiration column is AFTER today, then it'll count that child row. In my sheet, the child rows represent engagements that I want to count.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 58 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!