I have a dataset like this:
<table border="0" cellpadding="0" cellspacing="0" width="342"><col style="width: 65pt;" width="86"> <col style="width: 48pt;" span="4" width="64"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt; width: 65pt;" height="17" width="86">Factory</td> <td class="xl351" style="width: 48pt;" width="64"> SKU1</td> <td class="xl351" style="width: 48pt;" width="64"> SKU2</td> <td class="xl351" style="width: 48pt;" width="64"> SKU3</td> <td class="xl351" style="width: 48pt;" width="64"> SKU4</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351">
</td> <td class="xl351"> D16722A</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D19337</td> <td class="xl351"> D19406
</td> <td class="xl351"> D19806</td> <td class="xl351"> D19904</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351">
</td> <td class="xl351">
</td> </tr> </tbody></table>
Factory ,SKU1,SKU2,SKU3,SKu4 are column headers
I want all unique SKU records for a factory. So my final output will be like this:
<table border="0" cellpadding="0" cellspacing="0" width="150"><col style="width: 65pt;" width="86"> <col style="width: 48pt;" width="64"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt; width: 65pt;" height="17" width="86">Factory</td> <td class="xl352" style="width: 48pt;" width="64"> SKUs</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010</td> <td class="xl351"> D16722A</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl352" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19337</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl352" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19406</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19806</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19904</td> </tr> </tbody></table>
There are around 200 factories. SO I wonder I have to use macros ?
<table border="0" cellpadding="0" cellspacing="0" width="342"><col style="width: 65pt;" width="86"> <col style="width: 48pt;" span="4" width="64"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt; width: 65pt;" height="17" width="86">Factory</td> <td class="xl351" style="width: 48pt;" width="64"> SKU1</td> <td class="xl351" style="width: 48pt;" width="64"> SKU2</td> <td class="xl351" style="width: 48pt;" width="64"> SKU3</td> <td class="xl351" style="width: 48pt;" width="64"> SKU4</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351">
</td> <td class="xl351"> D16722A</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D19337</td> <td class="xl351"> D19406
</td> <td class="xl351"> D19806</td> <td class="xl351"> D19904</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010
</td> <td class="xl351"> D16722A</td> <td class="xl351">
</td> <td class="xl351">
</td> <td class="xl351">
</td> </tr> </tbody></table>
Factory ,SKU1,SKU2,SKU3,SKu4 are column headers
I want all unique SKU records for a factory. So my final output will be like this:
<table border="0" cellpadding="0" cellspacing="0" width="150"><col style="width: 65pt;" width="86"> <col style="width: 48pt;" width="64"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt; width: 65pt;" height="17" width="86">Factory</td> <td class="xl352" style="width: 48pt;" width="64"> SKUs</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">CL019010010</td> <td class="xl351"> D16722A</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl352" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19337</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl352" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19406</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19806</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl351" style="height: 12.75pt;" height="17">
</td> <td class="xl351"> D19904</td> </tr> </tbody></table>
There are around 200 factories. SO I wonder I have to use macros ?
Last edited: