Change card color of every row in a certain hierarchy

In card view, I would like to change the color of the sidebar of my cards so that every task under a parent category automatically has the same color as the parent card. I know how to manually change the color of each card, but is there a way to automate this so that each time a new row is added in my sheet the card automatically has the same color as the parent card? I have not been able to figure out how to make this happen with conditional formatting.

Answers

  • Hi @shannon.hummer

    Do you have a set number of Parent Rows with the same value? If so, we could create a helper column in your sheet to identify what the name of the Parent is for each child row, then set Conditional Formatting rules on that column.

    The formula would be like this:

    =IF(COUNT(ANCESTORS([Primary Column]@row)) = 0, [Primary Column]@row, PARENT([Primary Column]@row))

    This checks if the current row is a Parent row or not, and if it is, it returns the same Parent name into the cell. But if it's a child row, then it returns the Parent name. This way you have an identifier per-row:

    See: PARENT Function / ANCESTORS Function / IF Function / Set Formulas for All Rows with Column Formulas

    If you want to add more Parent rows to the sheet, you'll just need to set up the colour associated with that Parent text in a new Conditional Formatting rule once, then it will apply to all Child rows as well.


    Let me know if this makes sense and will work for you!

    Cheers,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • Thank you, Genevieve. That makes sense. I appreciate your help!