naveenraja16
New Member
- Joined
- Mar 3, 2016
- Messages
- 10
I am wanted to simplify the task of transforming 1000's of data in rows into a table with specified column headings. I do manual copy paste of data which is tedious.
[TABLE="width: 299"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]g[/TD]
[TD]l[/TD]
[TD]m[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]AIT-98932[/TD]
[TD="align: right"]-200[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]FT-98140[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]LT-36001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]FQIT-36003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]LT-37201[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]LT-39001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]LT-41005[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]LT-38002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AIT-37705[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]AIT-39510[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 960"]
<colgroup><col width="64" span="15" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]g1[/TD]
[TD="width: 64"]l1[/TD]
[TD="width: 64"]m1[/TD]
[TD="width: 64"]g2[/TD]
[TD="width: 64"]l2 [/TD]
[TD="width: 64"]m2[/TD]
[TD="width: 64"]g3 [/TD]
[TD="width: 64"]l3[/TD]
[TD="width: 64"]m3[/TD]
[TD="width: 64"]g4[/TD]
[TD="width: 64"]l4[/TD]
[TD="width: 64"]m4[/TD]
[TD="width: 64"]g5 [/TD]
[TD="width: 64"]l5[/TD]
[TD="width: 64"]m5[/TD]
[/TR]
[TR]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[TD]AIT-98932[/TD]
[TD="align: right"]-200[/TD]
[TD="align: right"]150[/TD]
[TD]FT-98140[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LT-36001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]FQIT-36003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7000[/TD]
[TD]LT-37201[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LT-39001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[TD]LT-41005[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]LT-38002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]AIT-37705[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]20[/TD]
[TD]AIT-39510[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
</tbody>[/TABLE]
with reference to the sample data available in the attached image , The data available in the bounded table on the left has to be tabulated under the headings g1 to m5 respectively. The bounded data with a thick border represents one set . That has to tabulated in the first row. Similarly the second set has to be populated in second row. The sets can be differentiated by referring the numbering of rows . every set begins with number 1 .
Can this forum help me in doing this task through a vba code.
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]g[/TD]
[TD]l[/TD]
[TD]m[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]AIT-98932[/TD]
[TD="align: right"]-200[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]FT-98140[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]LT-36001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]FQIT-36003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7000[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]LT-37201[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]LT-39001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]LT-41005[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]LT-38002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AIT-37705[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]AIT-39510[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 960"]
<colgroup><col width="64" span="15" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]g1[/TD]
[TD="width: 64"]l1[/TD]
[TD="width: 64"]m1[/TD]
[TD="width: 64"]g2[/TD]
[TD="width: 64"]l2 [/TD]
[TD="width: 64"]m2[/TD]
[TD="width: 64"]g3 [/TD]
[TD="width: 64"]l3[/TD]
[TD="width: 64"]m3[/TD]
[TD="width: 64"]g4[/TD]
[TD="width: 64"]l4[/TD]
[TD="width: 64"]m4[/TD]
[TD="width: 64"]g5 [/TD]
[TD="width: 64"]l5[/TD]
[TD="width: 64"]m5[/TD]
[/TR]
[TR]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[TD]PT-55002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]135[/TD]
[TD]AIT-98932[/TD]
[TD="align: right"]-200[/TD]
[TD="align: right"]150[/TD]
[TD]FT-98140[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LT-36001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]FQIT-36003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7000[/TD]
[TD]LT-37201[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LT-39001[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]110[/TD]
[TD]LT-41005[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]LT-38002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[TD]AIT-37705[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]20[/TD]
[TD]AIT-39510[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]100[/TD]
[/TR]
</tbody>[/TABLE]
with reference to the sample data available in the attached image , The data available in the bounded table on the left has to be tabulated under the headings g1 to m5 respectively. The bounded data with a thick border represents one set . That has to tabulated in the first row. Similarly the second set has to be populated in second row. The sets can be differentiated by referring the numbering of rows . every set begins with number 1 .
Can this forum help me in doing this task through a vba code.
Last edited: