Hello,
I have a some what of a tricky workflow that I need help with.
I have a table which have the following information: It has 4 columns Part 1, Part2, Part1(m/b) and Part2(M/B).
| Part1 | Part2 | Part1(M/B) | Part2(M/B) |
| ABC | a1234 | M | B |
| ABC | b4321 | M | B |
| CDE | a8989 | M | M |
| CDE | a4344 | M | B |
| CDE | a3434 | M | B |
| EFG | a3131 | M | M |
| EFG | a9999 | M | M |
| a3131 | a7979 | M | B |
| HIJ | a6464 | B | M |
| KLM | a8765 | B | B |
| a8989 | a6767 | M | M |
| a6767 | a8787 | M | B |
| a9999 | a5454 | M | B |
| NMO | a8967 | M | M |
I am trying to build a table which would look like this.
| Part | Result |
| ABC | a1234,b4321 |
| CDE | a8787,a4344,a3434 |
| EFG | a7979,a5454 |
| a3131 | a7979 |
| HIJ | HIJ |
| KLM | KLM |
| a8989 | a8787 |
| a6767 | a8787 |
| a9999 | a5454 |
| NMO | a8967 |
The conditions I am using are
if Part1(M/B) = M and Part2(M/B) = B then Part2
if part1(M/B) = M and Part2(M/B) = M then look the value of part2 in the Part 1 column and again check for the conditions if part1(M/B) = M and part2(M/B) = M then check the value in part2 column in column 1 and check for the conditions again if part1(M/B)= M and part2(M/B) = B then part2
I am going down each level until Part2 M/B = B or if there is no part 2 in part1 column. The purpose is to go down at the deepest possible level.
The table with the result column is what I am looking for.
Your help would be greatly appreciated.