Conditional Formatting to identify Parent/Child Relationship

goodwisa

New Member
Joined
Mar 31, 2002
Messages
6
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.
This message was edited by goodwisa on 2002-04-01 10:41
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
On 2002-04-01 10:38, goodwisa wrote:
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.

It is unclear how the codes must be read to see a parent and the associated children. Care to elaborate how the codes encodes a parent and that parent's children?
 
Upvote 0
On 2002-04-01 10:42, Aladin Akyurek wrote:
On 2002-04-01 10:38, goodwisa wrote:
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.

It is unclear how the codes must be read to see a parent and the associated children. Care to elaborate how the codes encodes a parent and that parent's children?
If the parent is a book with page numbers from 56147 to 56190, then children have pages that fit within that range (56150 to 56155, 56153 to 56154, etc.)
 
Upvote 0
On 2002-04-01 11:10, goodwisa wrote:
On 2002-04-01 10:42, Aladin Akyurek wrote:
On 2002-04-01 10:38, goodwisa wrote:
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.

It is unclear how the codes must be read to see a parent and the associated children. Care to elaborate how the codes encodes a parent and that parent's children?
If the parent is a book with page numbers from 56147 to 56190, then children have pages that fit within that range (56150 to 56155, 56153 to 56154, etc.)

Hope a VBA programmer will take this up from here, because you're bound by three conditions, thus three colors using Format|Conditional Formatting.

Even with VBA, things might get difficult with lots of parents that must be colored differently along with their children.
 
Upvote 0
On 2002-04-01 11:37, Aladin Akyurek wrote:
On 2002-04-01 11:10, goodwisa wrote:
On 2002-04-01 10:42, Aladin Akyurek wrote:
On 2002-04-01 10:38, goodwisa wrote:
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.

It is unclear how the codes must be read to see a parent and the associated children. Care to elaborate how the codes encodes a parent and that parent's children?
If the parent is a book with page numbers from 56147 to 56190, then children have pages that fit within that range (56150 to 56155, 56153 to 56154, etc.)

Hope a VBA programmer will take this up from here, because you're bound by three conditions, thus three colors using Format|Conditional Formatting.

Even with VBA, things might get difficult with lots of parents that must be colored differently along with their children.
 
Upvote 0
On 2002-04-01 11:37, Aladin Akyurek wrote:
On 2002-04-01 11:10, goodwisa wrote:
On 2002-04-01 10:42, Aladin Akyurek wrote:
On 2002-04-01 10:38, goodwisa wrote:
I would like to identify parent/child relationships in Excel by using conditional formatting.

Column 1 Column 2
GMAN-0056147 GMAN-0056190 (Parent)
GMAN-0056150 GMAN-0056155 (Child)
GMAN-0056153 GMAN-0056154 (Child)

I am able to identify the first child by using the mid function and comparing the 1st row against the second row, but am lost as to how I can write a formula to identify the second child and third and fourth, etc. This wouldn't be so hard, except that the number of children for a parent will not always be the same. Thanks in advance for your help.

It is unclear how the codes must be read to see a parent and the associated children. Care to elaborate how the codes encodes a parent and that parent's children?
If the parent is a book with page numbers from 56147 to 56190, then children have pages that fit within that range (56150 to 56155, 56153 to 56154, etc.)

Hope a VBA programmer will take this up from here, because you're bound by three conditions, thus three colors using Format|Conditional Formatting.

Even with VBA, things might get difficult with lots of parents that must be colored differently along with their children.
It's okay for the parents to be the same color and for the children to be a different color, so it might still be possible to use conditional formatting.
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,299
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top