#### Welcome to the Smartsheet Forum Archives

The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

# Is it possible to simple display the number of child cells that exist in a parent...like in the pare

edited 12/09/19

Is it possible to simple display the number of child cells that exist in a parent...like in the parent will say Tasks ( 8) because they are 8 children

• Employee
edited 07/26/16

You can definitely do this! You'll want to use a concatenation formula with a CHILDREN() operator, like the example below:

="Tasks (" + COUNT(CHILDREN()) + ")"

You can place this in the Primary column for each parent row. Hope this helps!

• This would be useful but will it work for a hierarchy which has Parent>Child>Child. Can you explain in more detail how to do this, where does the formula go, is it exactly as above? Is it hidden from view?

• Employee

Hi Andrew-- Just to confirm, you mean a hierarchy with Grandparent>Parent>Child, correct? I.E. multiple levels of nested hierarchy? If so, you could use this formula, you would just need to modify it slightly since it only considers direct children.

You'd want to use a regular COUNT(CHILDREN()) to count the number of direct children, then add direct references to each child row with additional children to come up with the overall, complete total of children:

="Text: " + (COUNT(CHILDREN()) + COUNT(CHILDREN([Primary Column]4)))

• Hi, yes it is grandparent>parent>child. Ideally I would want to show the number of parents in the grandparent row and the number of children in the parent row but not show the the number of children in the grandparent row

• ✭✭✭✭✭✭

Add a column and put this equation (copied from 23) in every cell:

=COUNT(CHILDREN([Primary Column]23))

Note that if one of the grand-parents children has no children, the grand-parent still counts them.

So Grandma has 5 kids

3 of those have children, 3, 2, and 1

The formula will show

GMa = 5

GMa's kids without children = 0

all grand-kids = 0

and the three parents will show 3, 2, and 1

Craig

This discussion has been closed.