StupidCoffee
New Member
- Joined
- Jun 11, 2013
- Messages
- 16
I am trying to organize my raw data into a different form chart to help me build a special trend.
I have one sheet with name, date, and shortened names for each component.
As a result of this macro I need a table that shows name, description (which will be repeated), date, and value of the component
Here is a sample
Raw:
[TABLE="width: 338"]
<colgroup><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Date[/TD]
[TD].H[/TD]
[TD].O[/TD]
[TD].N[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18
[/TD]
[/TR]
</tbody>[/TABLE]
Result:
[TABLE="width: 274"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Description[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]17[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]18[/TD]
[/TR]
</tbody>[/TABLE]
I tried using INDEX function, but I need a macro code for this.
Please help..
I have one sheet with name, date, and shortened names for each component.
As a result of this macro I need a table that shows name, description (which will be repeated), date, and value of the component
Here is a sample
Raw:
[TABLE="width: 338"]
<colgroup><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Date[/TD]
[TD].H[/TD]
[TD].O[/TD]
[TD].N[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]18
[/TD]
[/TR]
</tbody>[/TABLE]
Result:
[TABLE="width: 274"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Description[/TD]
[TD]Date[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]3/12/2013[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]5/10/2013[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]A.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD]A.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD]A.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]6/2/2013[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]1/22/2013[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]3/15/2013[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD]B.H[/TD]
[TD]Hydrogen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD]B.O[/TD]
[TD]Oxygen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]17[/TD]
[/TR]
[TR]
[TD]B.N[/TD]
[TD]Nitrogen[/TD]
[TD="align: right"]5/20/2013[/TD]
[TD="align: right"]18[/TD]
[/TR]
</tbody>[/TABLE]
I tried using INDEX function, but I need a macro code for this.
Please help..