Grothgar101
New Member
- Joined
- Feb 8, 2018
- Messages
- 3
Hi All;
I have a lot of data (some of which I've shown below) that I'm trying to map in a certain way.
[TABLE="width: 195"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="align: right"]27[/TD]
[TD="align: right"]1005516[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005511[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005514[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005411[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005513[/TD]
[/TR]
[TR]
[TD="align: right"]1005512[/TD]
[TD="align: right"]1005510[/TD]
[/TR]
[TR]
[TD="align: right"]1005513[/TD]
[TD="align: right"]1005410[/TD]
[/TR]
[TR]
[TD="align: right"]1005515[/TD]
[TD="align: right"]1005512[/TD]
[/TR]
[TR]
[TD="align: right"]1005516[/TD]
[TD="align: right"]1005515[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]1005640[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005511[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005514[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005411[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005513[/TD]
[/TR]
[TR]
[TD="align: right"]1005512[/TD]
[TD="align: right"]1005510[/TD]
[/TR]
[TR]
[TD="align: right"]1005513[/TD]
[TD="align: right"]1005410[/TD]
[/TR]
[TR]
[TD="align: right"]1005515[/TD]
[TD="align: right"]1005512[/TD]
[/TR]
[TR]
[TD="align: right"]1005640[/TD]
[TD="align: right"]1005515[/TD]
[/TR]
</tbody>[/TABLE]
The small code (27, 35 etc) is the actual material number, and then the larger codes are ingredients that go into it.
For example, 35 is fed by 1005640, which is fed by 1005515, which is fed by 1005512 which is fed by 1005510 which is fed by both 1005511 & 1005514.
And it's the fact that some levels are fed by multiple ingredients that is causing me an issue in mapping which levels fall into what upper levels. If it was a 1 for 1 mapping, then I could just do a VLOOKUP on each level and find the correct data. This approach get's me about 40% of the way there, but given there are over 5000 products, that doesn't help me that much!
So, is there a formula, a way of working, or some VBA Code that will take the information I have above, and then map it into columns, with the material number first, the second level ingredient next, then third, then 4th etc?
Thanks in Advance.
I have a lot of data (some of which I've shown below) that I'm trying to map in a certain way.
[TABLE="width: 195"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="align: right"]27[/TD]
[TD="align: right"]1005516[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005511[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005514[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005411[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005513[/TD]
[/TR]
[TR]
[TD="align: right"]1005512[/TD]
[TD="align: right"]1005510[/TD]
[/TR]
[TR]
[TD="align: right"]1005513[/TD]
[TD="align: right"]1005410[/TD]
[/TR]
[TR]
[TD="align: right"]1005515[/TD]
[TD="align: right"]1005512[/TD]
[/TR]
[TR]
[TD="align: right"]1005516[/TD]
[TD="align: right"]1005515[/TD]
[/TR]
[TR]
[TD="align: right"]35[/TD]
[TD="align: right"]1005640[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005511[/TD]
[/TR]
[TR]
[TD="align: right"]1005510[/TD]
[TD="align: right"]1005514[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005411[/TD]
[/TR]
[TR]
[TD="align: right"]1005511[/TD]
[TD="align: right"]1005513[/TD]
[/TR]
[TR]
[TD="align: right"]1005512[/TD]
[TD="align: right"]1005510[/TD]
[/TR]
[TR]
[TD="align: right"]1005513[/TD]
[TD="align: right"]1005410[/TD]
[/TR]
[TR]
[TD="align: right"]1005515[/TD]
[TD="align: right"]1005512[/TD]
[/TR]
[TR]
[TD="align: right"]1005640[/TD]
[TD="align: right"]1005515[/TD]
[/TR]
</tbody>[/TABLE]
The small code (27, 35 etc) is the actual material number, and then the larger codes are ingredients that go into it.
For example, 35 is fed by 1005640, which is fed by 1005515, which is fed by 1005512 which is fed by 1005510 which is fed by both 1005511 & 1005514.
And it's the fact that some levels are fed by multiple ingredients that is causing me an issue in mapping which levels fall into what upper levels. If it was a 1 for 1 mapping, then I could just do a VLOOKUP on each level and find the correct data. This approach get's me about 40% of the way there, but given there are over 5000 products, that doesn't help me that much!
So, is there a formula, a way of working, or some VBA Code that will take the information I have above, and then map it into columns, with the material number first, the second level ingredient next, then third, then 4th etc?
Thanks in Advance.