M
msnyc07
I have a table I found that is essentially a 'hierarchical' table but laid
out in such a way I can't really use it w/o further processing. Essentially
it is currently something like this
Type | Type Code | Subtype | SubType Code | SubSubType | SubSubType Code
I really just want to end up with
Type | Type Code | Parent Code
So I might have
Fruit | 100000 | Citrus | 100100 | Orange | 1001001
Fruit | 100000 | Citrus | 100100 | Lemon | 1001002
Fruit | 100000 | Melon | 100200 | Cantelope | 100201
Fruit | 100000 | Melon | 100200 | Honeydew | 100202
Meat | 200000 | Beef | 200100 | Tenderloin | 200101
Meat | 200000 | Beef | 200100 | Brisket | 200102
Meat | 200000 | Pork | 200200 | Bacon | 200201
and I want
Fruit | 100000 |
Melon | 100200 | 100000
Cirtus | 100100 | 100000
Orange | 100101| 100100
Lemon | 100102 | 100100
Cantelope | 100201 | 100200
Honeydew | 100202 | 100200
Meat | 200000
Beef | 200100 | 200000
Pork | 200200 | 200000
Tenderloin | 200101 | 200100
Brisket | 200102 | 200100
Bacon | 200201 | 200200
Is there an easy function I could use to process the sheet thusly?
out in such a way I can't really use it w/o further processing. Essentially
it is currently something like this
Type | Type Code | Subtype | SubType Code | SubSubType | SubSubType Code
I really just want to end up with
Type | Type Code | Parent Code
So I might have
Fruit | 100000 | Citrus | 100100 | Orange | 1001001
Fruit | 100000 | Citrus | 100100 | Lemon | 1001002
Fruit | 100000 | Melon | 100200 | Cantelope | 100201
Fruit | 100000 | Melon | 100200 | Honeydew | 100202
Meat | 200000 | Beef | 200100 | Tenderloin | 200101
Meat | 200000 | Beef | 200100 | Brisket | 200102
Meat | 200000 | Pork | 200200 | Bacon | 200201
and I want
Fruit | 100000 |
Melon | 100200 | 100000
Cirtus | 100100 | 100000
Orange | 100101| 100100
Lemon | 100102 | 100100
Cantelope | 100201 | 100200
Honeydew | 100202 | 100200
Meat | 200000
Beef | 200100 | 200000
Pork | 200200 | 200000
Tenderloin | 200101 | 200100
Brisket | 200102 | 200100
Bacon | 200201 | 200200
Is there an easy function I could use to process the sheet thusly?