Thanks for your reply! Unfortunately not. What I need to know is not which shops has which goods, but I need to know which goods are equivalent amonst the shops different codes.
Please see this example:
[TABLE="width: 192"]
<tbody>[TR]
[TD="class: xl63, width: 64"]mat doc[/TD]
[TD="class: xl63, width: 64"]Shop[/TD]
[TD="class: xl63, width: 64"]mat code[/TD]
[/TR]
[TR]
[TD="class: xl65"]3456[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]3456[/TD]
[TD="class: xl65"]ShopA[/TD]
[TD="class: xl65"]DFcode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]4567[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]4567[/TD]
[TD="class: xl65"]ShopA[/TD]
[TD="class: xl65"]DFcode3[/TD]
[/TR]
[TR]
[TD="class: xl65"]5678[/TD]
[TD="class: xl65"]ShopB[/TD]
[TD="class: xl65"]code3[/TD]
[/TR]
[TR]
[TD="class: xl65"]5678[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
</tbody>[/TABLE]
Where mat docs are equal those are the same goods. So ShopC-Ccode2 is the same as ShopA-DFcode2 (both has mat doc 3456). Also ShopB-code3 is the item as ShopC-Ccode2 as they share mat doc 5678. So ShopC-Ccode2 is equal to ShopA-DFcode2 and also equal to ShopB-code3
What I'd like to have is one line per item that contains all of it's different mat codes for the same item:
ShopC-Ccode2 ShopA-DFcode2 ShopB-code3
Given this table:
[TABLE="width: 192"]
<tbody>[TR]
[TD="class: xl66, width: 64"]mat doc[/TD]
[TD="class: xl66, width: 64"]Shop[/TD]
[TD="class: xl66, width: 64"]mat code[/TD]
[/TR]
[TR]
[TD="class: xl65"]1234A[/TD]
[TD="class: xl65"]ShopA[/TD]
[TD="class: xl65"]DFcode1[/TD]
[/TR]
[TR]
[TD="class: xl65"]1234A[/TD]
[TD="class: xl65"]ShopB[/TD]
[TD="class: xl65"]code1[/TD]
[/TR]
[TR]
[TD="class: xl65"]2345[/TD]
[TD="class: xl65"]ShopB[/TD]
[TD="class: xl65"]code2[/TD]
[/TR]
[TR]
[TD="class: xl65"]2345[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode1[/TD]
[/TR]
[TR]
[TD="class: xl65"]3456[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]3456[/TD]
[TD="class: xl65"]ShopA[/TD]
[TD="class: xl65"]DFcode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]4567[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]4567[/TD]
[TD="class: xl65"]ShopA[/TD]
[TD="class: xl65"]DFcode3[/TD]
[/TR]
[TR]
[TD="class: xl65"]5678[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode2[/TD]
[/TR]
[TR]
[TD="class: xl65"]5678[/TD]
[TD="class: xl65"]ShopB[/TD]
[TD="class: xl65"]code3[/TD]
[/TR]
[TR]
[TD="class: xl65"]6789[/TD]
[TD="class: xl65"]ShopC[/TD]
[TD="class: xl65"]Ccode1[/TD]
[/TR]
[TR]
[TD="class: xl65"]6789[/TD]
[TD="class: xl65"]ShopB[/TD]
[TD="class: xl65"]code2[/TD]
[/TR]
</tbody>[/TABLE]
the result needs to be this:
[TABLE="width: 512"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Shop1[/TD]
[TD="class: xl65, width: 64"]code1[/TD]
[TD="class: xl65, width: 64"]Shop2[/TD]
[TD="class: xl65, width: 64"]code2[/TD]
[TD="class: xl65, width: 64"]Shop3[/TD]
[TD="class: xl65, width: 64"]code3[/TD]
[TD="class: xl65, width: 64"]Shop4[/TD]
[TD="class: xl65, width: 64"]code4[/TD]
[/TR]
[TR]
[TD="class: xl66"]ShopA[/TD]
[TD="class: xl66"]DFcode1[/TD]
[TD="class: xl66"]ShopB[/TD]
[TD="class: xl66"]code1[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl66"]ShopC[/TD]
[TD="class: xl66"]Ccode2[/TD]
[TD="class: xl66"]ShopA[/TD]
[TD="class: xl66"]DFcode2[/TD]
[TD="class: xl66"]ShopA[/TD]
[TD="class: xl66"]DFcode3[/TD]
[TD="class: xl66"]ShopB[/TD]
[TD="class: xl66"]code3[/TD]
[/TR]
[TR]
[TD="class: xl66"]ShopB[/TD]
[TD="class: xl66"]code2[/TD]
[TD="class: xl66"]ShopC[/TD]
[TD="class: xl66"]Ccode1[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
</tbody>[/TABLE]