Hey! It's my first time posting here, and I really hope someone can help me! 😄
I have a formula which I'd like to modify. I will explain what I have and then how I'd want to change it.
I have a formula that auto-numbers indented rows, and resets the count to 1 for every parent row, like this:
→ RowId column that is of type # Auto number
→ Helper column with the formula =MATCH(RowId@row, RowId:RowId, 0), which makes sure the number are counted correctly
→ IsParent which checks if the row has children, with =COUNT(CHILDREN()) > 0
→ finally, Nr column with formula =IF(IsParent@row, Helper@row, Helper@row - PARENT()), which subtracts the value of the parent from the helper column so that children will always start counting from 1.
The problem:
I have two more columns, Name and NameChange:
→ Name is a multiple choice column that can change values between A and B (and possibly C,D etc)
→ NameChange is a column that becomes 1 every time the value from Name changes, or more like when it is different from the value in the cell above it, with the formula =IFERROR(IF(INDEX(Name:Name, MATCH(RowId@row - 1, RowId:RowId, 0))<> Name@row, 1, 0), 1)
What I need is the formula to start counting from 1 every time the Name column changes, (so every time NameChange is 1) like in the picture shown above, where I manually wrote the values of the Nr column.
I don't know how to do this without introducing another parent row every time the Name changes, which is really not ideal. I also want to keep Nr being a column formula, and can create helper formulas if needed, but I don't want to do anything manually because the sheet changes a lot during the day.
If you have any ideas please answer them here and thanks a lot!! 😃