Format a parent row with two levels of indents

Options

I am very new to Smartsheet and am trying to figure out how to format a parent row where I have two levels of indents. I think I understand that I need to create a helper column so that I can then apply conditional formatting. I struggling to figure out the formula, though, to designate the parent row. I've tried so many things and I can't seem to get it. Can anyone help, please? Here's a screenshot of my sheet (FYI, my parent rows are all different names, not categories):

Thank you!

Best Answer

  • Ray Lindstrom
    Ray Lindstrom ✭✭✭✭✭✭
    edited 03/03/23 Answer ✓
    Options

    Hi @ASanders,

    I use a helper checkbox column that I keep hidden called Parent Row Check with the following column formula applied:

    =IF(COUNT(CHILDREN()) > 0, true, false)

    This checks the box if the row is a parent. I then use conditional formatting for parent rows with this column as the criteria.

    I also use a hidden Row Level text type column. It's column formula looks like this:

    =COUNT(ANCESTORS()) + 1

    The Row Level column shows the level in the hierarchy (ancestor/parent/child). Also useful for conditional formatting among other things.

    Hope this helps!

    BRgds,

    -Ray

Answers

  • Ray Lindstrom
    Ray Lindstrom ✭✭✭✭✭✭
    edited 03/03/23 Answer ✓
    Options

    Hi @ASanders,

    I use a helper checkbox column that I keep hidden called Parent Row Check with the following column formula applied:

    =IF(COUNT(CHILDREN()) > 0, true, false)

    This checks the box if the row is a parent. I then use conditional formatting for parent rows with this column as the criteria.

    I also use a hidden Row Level text type column. It's column formula looks like this:

    =COUNT(ANCESTORS()) + 1

    The Row Level column shows the level in the hierarchy (ancestor/parent/child). Also useful for conditional formatting among other things.

    Hope this helps!

    BRgds,

    -Ray

  • ASanders
    Options

    Thank you, @Ray Lindstrom! The second option worked for me. I think I realized that the variations on the first option you provided that I was trying weren't working because I had two parent rows and it was identifying both of those.

  • Ray Lindstrom
    Ray Lindstrom ✭✭✭✭✭✭
    Options

    Awesome, so glad it worked for you! I know exactly what you mean, and actually use both of these for reports. Just depends on what and how I'm trying to slice the data.