ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   parent/child relationship between rows? (https://www.excelbanter.com/excel-worksheet-functions/254602-parent-child-relationship-between-rows.html)

Doug

parent/child relationship between rows?
 
I have a list of about a thousand rows. I want to divide these rows by
inserting new rows as 'headers' for certain groups of rows. is there a way
to 'attach' the rows below the 'header' row? When i do a sort over the
entire spreadsheet, I want the 'child' rows to maintain a relationship to the
'parent/header' row. TIA

ExcelBanter AI

Answer: parent/child relationship between rows?
 
Yes, you can create a parent/child relationship between rows in Excel by using the Group feature. Here are the steps:
  1. Select the rows that you want to group together.
  2. Right-click on the selected rows and choose "Group" from the context menu.
  3. A new row will be inserted above the selected rows with a grouping symbol (a number) in the left-hand margin.
  4. Click on the grouping symbol to collapse or expand the group of rows.
  5. Repeat steps 1-4 for each group of rows that you want to create.

When you sort the spreadsheet, the child rows will maintain their relationship to the parent/header row. However, keep in mind that the grouping symbols will move with the rows, so you may need to re-group the rows after sorting.

Another option is to use the "Outline" feature, which allows you to create a hierarchical structure of rows and sub-rows. To use this feature, select the rows that you want to group together and click on the "Group" button in the "Outline" group on the "Data" tab. You can then use the "+" and "-" symbols in the left-hand margin to collapse or expand the outline. When you sort the spreadsheet, the outline will be maintained.

Eva

parent/child relationship between rows?
 
Hi
I would create a new column called for example "Group" and fill in all rows
(don't leave blanks there) then clik Data/Group and outline/group

Click yes if helped
--
Greatly appreciated
Eva


"Doug" wrote:

I have a list of about a thousand rows. I want to divide these rows by
inserting new rows as 'headers' for certain groups of rows. is there a way
to 'attach' the rows below the 'header' row? When i do a sort over the
entire spreadsheet, I want the 'child' rows to maintain a relationship to the
'parent/header' row. TIA


Doug

parent/child relationship between rows?
 
Eva, I can see how this might help. But it leaves me to sort by this new
Group in order to keep the relationship between the header (parent) and
subsequent rows (children). We may want to sort the spreadsheet, but only by
the headers while keeping the children 'attached' to the parent.

"Eva" wrote:

Hi
I would create a new column called for example "Group" and fill in all rows
(don't leave blanks there) then clik Data/Group and outline/group

Click yes if helped
--
Greatly appreciated
Eva


"Doug" wrote:

I have a list of about a thousand rows. I want to divide these rows by
inserting new rows as 'headers' for certain groups of rows. is there a way
to 'attach' the rows below the 'header' row? When i do a sort over the
entire spreadsheet, I want the 'child' rows to maintain a relationship to the
'parent/header' row. TIA


Eva

parent/child relationship between rows?
 
Hi
I still think that it should work, even you don't have to group it (I don't
like this future and I don't use it actually), but creating a colum called
"group" or "header" should really help. example
group data
A 1
A 2
B 1
B 3
B 5
etc
so when you sort by the colum A (group) all data are "attached" to the
group, so I think it should solve the problem you have
Click yes if helped
--
Greatly appreciated
Eva


"Doug" wrote:

Eva, I can see how this might help. But it leaves me to sort by this new
Group in order to keep the relationship between the header (parent) and
subsequent rows (children). We may want to sort the spreadsheet, but only by
the headers while keeping the children 'attached' to the parent.

"Eva" wrote:

Hi
I would create a new column called for example "Group" and fill in all rows
(don't leave blanks there) then clik Data/Group and outline/group

Click yes if helped
--
Greatly appreciated
Eva


"Doug" wrote:

I have a list of about a thousand rows. I want to divide these rows by
inserting new rows as 'headers' for certain groups of rows. is there a way
to 'attach' the rows below the 'header' row? When i do a sort over the
entire spreadsheet, I want the 'child' rows to maintain a relationship to the
'parent/header' row. TIA



All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com