How to count grandchildren.

edited 12/09/19 in Using Smartsheet
10/31/19 Edited 12/09/19

I'm trying to count how many grandchildren I have in a chart, how do I create the formulas for this?

Note that I would be adding and removing rows and I need this counter to keep updating with rows inserted and removed.

Example:

  • Parent (Grandchildren Count of 6)
    • Children (3)
      • Grandchildren
      • Grandchildren
      • Grandchildren
    • Children (2)
      • Grandchildren
      • Grandchildren
    • Children (1)
      • Grandchildren

Grandchildren.PNG

Comments

  • Andrée StaråAndrée Starå ✭✭✭✭✭

    Hi,

    Have a look at this thread.

    https://community.smartsheet.com/discussion/countifs-parent-row-only

    Did that give you the solution?

    I hope that helps!

    Have a fantastic weekend!

    Best,

    Andrée Starå

    Workflow Consultant / CEO @ WORK BOLD

    work-bold

    SMARTSHEET PARTNER & CONSULTANT / EXPERT

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E: [email protected] | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.

  • Paul NewcomePaul Newcome ✭✭✭✭✭

    =COUNT(DESCENDANTS())

     

    This will count ALL descendants (child and grand child rows)

    .

    =COUNT(CHILDREN())

     

    This will count only the direct children rows (not the grandchildren rows)

    .

    Subtract the number of children from the number of descendants to find the number of grandchildren.

     

    =COUNT(DESCENDANTS()) - COUNT(CHILDREN())

    thinkspi.com

Sign In or Register to comment.