We have a need to selectively combine rows of data, merging groups of rows into a single row in order to facilitate a big mail merge into some special labels. I've searched around here but can't find a solution that matches.
These are examples of data input and output that we need to accomplish.
<table border="0" cellpadding="0" cellspacing="0" width="320"><colgroup><col style="width:48pt" span="5" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-1</td> <td style="width:48pt" width="64">Data-b-1</td> <td style="width:48pt" width="64">Data-c-1</td> <td style="width:48pt" width="64">Data-d-1</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name1</td> <td>Data-a-2</td> <td>Data-b-2</td> <td>Data-c-2</td> <td>Data-d-2</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-3</td> <td>Data-b-3</td> <td>Data-c-3</td> <td>Data-d-3</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-4</td> <td>Data-b-4</td> <td>Data-c-4</td> <td>Data-d-4</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name3</td> <td>Data-a-5</td> <td>Data-b-5</td> <td>Data-c-5</td> <td>Data-d-5</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-6</td> <td>Data-b-6</td> <td>Data-c-6</td> <td>Data-d-6</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-7</td> <td>Data-b-7</td> <td>Data-c-7</td> <td>Data-d-7</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-8</td> <td>Data-b-8</td> <td>Data-c-8</td> <td>Data-d-8</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-9</td> <td>Data-b-9</td> <td>Data-c-9</td> <td>Data-d-9</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-10</td> <td>Data-b-10</td> <td>Data-c-10</td> <td>Data-d-10</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name6</td> <td>Data-a-11</td> <td>Data-b-11</td> <td>Data-c-11</td> <td>Data-d-11</td> </tr> </tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="960"><colgroup><col style="width:48pt" span="15" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-1</td> <td style="width:48pt" width="64">Data-b-1</td> <td style="width:48pt" width="64">Data-c-1</td> <td style="width:48pt" width="64">Data-d-1</td> <td style="width:48pt" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-2</td> <td style="width:48pt" width="64">Data-b-2</td> <td style="width:48pt" width="64">Data-c-2</td> <td style="width:48pt" width="64">Data-d-2</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-3</td> <td>Data-b-3</td> <td>Data-c-3</td> <td>Data-d-3</td> <td>Name2</td> <td>Data-a-4</td> <td>Data-b-4</td> <td>Data-c-4</td> <td>Data-d-4</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name3</td> <td>Data-a-5</td> <td>Data-b-5</td> <td>Data-c-5</td> <td>Data-d-5</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-6</td> <td>Data-b-6</td> <td>Data-c-6</td> <td>Data-d-6</td> <td>Name4</td> <td>Data-a-7</td> <td>Data-b-7</td> <td>Data-c-7</td> <td>Data-d-7</td> <td>Name4</td> <td>Data-a-8</td> <td>Data-b-8</td> <td>Data-c-8</td> <td>Data-d-8</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-9</td> <td>Data-b-9</td> <td>Data-c-9</td> <td>Data-d-9</td> <td>Name5</td> <td>Data-a-10</td> <td>Data-b-10</td> <td>Data-c-10</td> <td colspan="2" style="mso-ignore:colspan">Data-d-10</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name6</td> <td>Data-a-11</td> <td>Data-b-11</td> <td>Data-c-11</td> <td colspan="2" style="mso-ignore:colspan">Data-d-11</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table>
There are also cases where we can skip the re-statement of "Name" in the rows, but this can be done separately as well.
Can anyone point me in the right direction? Spent many years programming ... many years ago. No experience with VB, so this will be my starting point. I appreciate any suggestions.
These are examples of data input and output that we need to accomplish.
<table border="0" cellpadding="0" cellspacing="0" width="320"><colgroup><col style="width:48pt" span="5" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-1</td> <td style="width:48pt" width="64">Data-b-1</td> <td style="width:48pt" width="64">Data-c-1</td> <td style="width:48pt" width="64">Data-d-1</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name1</td> <td>Data-a-2</td> <td>Data-b-2</td> <td>Data-c-2</td> <td>Data-d-2</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-3</td> <td>Data-b-3</td> <td>Data-c-3</td> <td>Data-d-3</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-4</td> <td>Data-b-4</td> <td>Data-c-4</td> <td>Data-d-4</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name3</td> <td>Data-a-5</td> <td>Data-b-5</td> <td>Data-c-5</td> <td>Data-d-5</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-6</td> <td>Data-b-6</td> <td>Data-c-6</td> <td>Data-d-6</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-7</td> <td>Data-b-7</td> <td>Data-c-7</td> <td>Data-d-7</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-8</td> <td>Data-b-8</td> <td>Data-c-8</td> <td>Data-d-8</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-9</td> <td>Data-b-9</td> <td>Data-c-9</td> <td>Data-d-9</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-10</td> <td>Data-b-10</td> <td>Data-c-10</td> <td>Data-d-10</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name6</td> <td>Data-a-11</td> <td>Data-b-11</td> <td>Data-c-11</td> <td>Data-d-11</td> </tr> </tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="960"><colgroup><col style="width:48pt" span="15" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:48pt" height="20" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-1</td> <td style="width:48pt" width="64">Data-b-1</td> <td style="width:48pt" width="64">Data-c-1</td> <td style="width:48pt" width="64">Data-d-1</td> <td style="width:48pt" width="64">Name1</td> <td style="width:48pt" width="64">Data-a-2</td> <td style="width:48pt" width="64">Data-b-2</td> <td style="width:48pt" width="64">Data-c-2</td> <td style="width:48pt" width="64">Data-d-2</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> <td style="width:48pt" width="64">
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name2</td> <td>Data-a-3</td> <td>Data-b-3</td> <td>Data-c-3</td> <td>Data-d-3</td> <td>Name2</td> <td>Data-a-4</td> <td>Data-b-4</td> <td>Data-c-4</td> <td>Data-d-4</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name3</td> <td>Data-a-5</td> <td>Data-b-5</td> <td>Data-c-5</td> <td>Data-d-5</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name4</td> <td>Data-a-6</td> <td>Data-b-6</td> <td>Data-c-6</td> <td>Data-d-6</td> <td>Name4</td> <td>Data-a-7</td> <td>Data-b-7</td> <td>Data-c-7</td> <td>Data-d-7</td> <td>Name4</td> <td>Data-a-8</td> <td>Data-b-8</td> <td>Data-c-8</td> <td>Data-d-8</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name5</td> <td>Data-a-9</td> <td>Data-b-9</td> <td>Data-c-9</td> <td>Data-d-9</td> <td>Name5</td> <td>Data-a-10</td> <td>Data-b-10</td> <td>Data-c-10</td> <td colspan="2" style="mso-ignore:colspan">Data-d-10</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Name6</td> <td>Data-a-11</td> <td>Data-b-11</td> <td>Data-c-11</td> <td colspan="2" style="mso-ignore:colspan">Data-d-11</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table>
There are also cases where we can skip the re-statement of "Name" in the rows, but this can be done separately as well.
Can anyone point me in the right direction? Spent many years programming ... many years ago. No experience with VB, so this will be my starting point. I appreciate any suggestions.