How do I always reference a child row immediately below the parent row(In the same column)?
Probably a basic way to do this but I cant get it to work.
I need the circled cell to always refer to the cell immediately below it. So the circled cell will show "OFF HIRE' from the blue row until a new row is inserted in between the 2 and then it will refer to the new row's cell.
Best Answer
-
This approach will require the addition of a helper column, if it doesn't already exist in your sheet. We use the system generated auto-number column. It will default to a column name of [Row ID]. Insert a column and choose system generated auto-number column as the column property type.
Once created (and saved) enter this formula in the appropriate cell
=INDEX(CHILDREN(), MATCH(MIN(COLLECT(CHILDREN([Row ID]@row), CHILDREN([Row ID]@row), >[Row ID]@row)), 0))
This says to give the Child of that column where the Row ID of that Child matches the minimum Row ID that is greater than the row you are sitting on. As you slide rows around, the row ID will change as you slide, which should make any row you slide to the blue position pop up as the answer. If you didn't slide the rows around and always entered any new children at the bottom of the child section we would change the Min to a Max- assuming all other rows kept their chronological positions.
Will this work for you?
Kelly
Answers
-
This approach will require the addition of a helper column, if it doesn't already exist in your sheet. We use the system generated auto-number column. It will default to a column name of [Row ID]. Insert a column and choose system generated auto-number column as the column property type.
Once created (and saved) enter this formula in the appropriate cell
=INDEX(CHILDREN(), MATCH(MIN(COLLECT(CHILDREN([Row ID]@row), CHILDREN([Row ID]@row), >[Row ID]@row)), 0))
This says to give the Child of that column where the Row ID of that Child matches the minimum Row ID that is greater than the row you are sitting on. As you slide rows around, the row ID will change as you slide, which should make any row you slide to the blue position pop up as the answer. If you didn't slide the rows around and always entered any new children at the bottom of the child section we would change the Min to a Max- assuming all other rows kept their chronological positions.
Will this work for you?
Kelly
-
Perfect - thankyou very much!
-
I know this is reply is now years after the fact, but there actually is a much, MUCH simpler way:
=INDEX(CHILDREN(), 1)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!