Marcus131975
New Member
- Joined
- Feb 9, 2018
- Messages
- 14
Hello
Id be really grateful if anyone is able to tell me how to solve the following in VBA:
I need to extract (into two columns on a separate sheet ideally) the child and parent relationship from a table of data. The table data range varies between 5 and 10 columns, with the right most column being the child and the columns to the left showing the various parent up to the top parent. I am only concerned with the immediate parent of each value and any duplicates should be ignored.
Hopefully the below example might help explain this. Thank you.
Before
Desired Result
Marcus
Id be really grateful if anyone is able to tell me how to solve the following in VBA:
I need to extract (into two columns on a separate sheet ideally) the child and parent relationship from a table of data. The table data range varies between 5 and 10 columns, with the right most column being the child and the columns to the left showing the various parent up to the top parent. I am only concerned with the immediate parent of each value and any duplicates should be ignored.
Hopefully the below example might help explain this. Thank you.
Before
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | A | A | A | 1 | ||
2 | A | A | B | 2 | ||
3 | A | A | D | 3 | ||
4 | A | B | C | 4 | ||
Sheet1 |
Desired Result
Book1 | ||||
---|---|---|---|---|
A | B | |||
8 | 1 | A | ||
9 | 2 | B | ||
10 | 3 | D | ||
11 | 4 | C | ||
12 | B | A | ||
13 | D | A | ||
14 | C | B | ||
15 | A | |||
Sheet1 |
Marcus