Is the Parent Row expanded?
Is there a way to know if a parent row is expanded (that is the + sign was clicked and the children are visible)?
For example, my sheet contains 3 rows that are parents (Orders 1, 2, and 3 below) each representing a different order. The children of each parent is an item in that order. For sake of discussion and application to other situations, let's say one row (Order 4) is also an order, but it has no children.
Notice that Orders 1 and 2 are expanded to reveal the children, while Order 3 is not expanded. Order 4 is not a parent row.
- Order 1
- Order 2
+ Order 3
I would like the text (e.g., "Order 1") to be invisible if that parent is expanded, displaying the children. Currently, I have a hidden column that identifies each row as a parent or child (or neither), then use conditional formatting to change the text to match the background if a parent row. Works fine.
However, if the parent is collapsed (e.g., Order 3 above), I'd like the conditional formatting to show the text (make it black).
So, I need a new two conditions for the formatting:
- Make the text on the parent row the same as the background (to appear that the text isn't there) if the parent is expanded and the children are visible (applies to Orders 1 and 2 above)
- Make the text on the parent row black, so it appears when the parent is not expanded and the children are not visible (applies to Order 3 above).
The text of Order 4 would not be affected because it is not a parent row. (I know this because of the value in my hidden column that identifies each row as a parent or child (or neither).
The only thing I am missing is the way to know if a parent row is expanded or not. Does the parent row, for example, have some system value that I can include in a hidden column that displays, say, "1" if the parent row is expanded and "0" if not?