johnmpl
Board Regular
- Joined
- Jun 14, 2013
- Messages
- 237
- Office Version
- 365
- Platform
- Windows
Hi, to all!
I need to special unpivot some data.
Input:
[TABLE="width: 734"]
<colgroup><col span="3"><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]NAMEA[/TD]
[TD]NAMEB[/TD]
[TD]NAMEC[/TD]
[TD]DATE THING 1[/TD]
[TD]DESCRIPTION[/TD]
[TD]DATE THING 2[/TD]
[TD]DESCRIPTION 2[/TD]
[TD]DATE THING 3[/TD]
[TD]DESCRIPTION 3[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD="align: right"]28/01/2019[/TD]
[TD]Descript 1[/TD]
[TD="align: right"]24/02/2019[/TD]
[TD]Descript 28[/TD]
[TD="align: right"]23/03/2019[/TD]
[TD]Descript 55[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD="align: right"]29/01/2019[/TD]
[TD]Descript 2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]24/03/2019[/TD]
[TD]Descript 56[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD="align: right"]30/01/2019[/TD]
[TD]Descript 3[/TD]
[TD="align: right"]26/02/2019[/TD]
[TD]Descript 30[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name4[/TD]
[TD]Name31[/TD]
[TD]Name58[/TD]
[TD="align: right"]31/01/2019[/TD]
[TD]Descript 4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]28/02/2019[/TD]
[TD]Descript 32[/TD]
[TD="align: right"]27/03/2019[/TD]
[TD]Descript 59
[/TD]
[/TR]
</tbody>[/TABLE]
Output:
[TABLE="width: 388"]
<colgroup><col><col span="2"><col span="2"><col></colgroup><tbody>[TR]
[TD]NAMEA[/TD]
[TD]NAMEB[/TD]
[TD]NAMEC[/TD]
[TD]TYPE[/TD]
[TD]DATE[/TD]
[TD]DESCRIPTION[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 1[/TD]
[TD="align: right"]28/01/2019[/TD]
[TD]Descript 1[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 2[/TD]
[TD="align: right"]24/02/2019[/TD]
[TD]Descript 28[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 3[/TD]
[TD="align: right"]23/03/2019[/TD]
[TD]Descript 55[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD]THING 1[/TD]
[TD="align: right"]29/01/2019[/TD]
[TD]Descript 2[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD]THING 3[/TD]
[TD="align: right"]24/03/2019[/TD]
[TD]Descript 56[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD]THING 1[/TD]
[TD="align: right"]30/01/2019[/TD]
[TD]Descript 3[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD]THING 2[/TD]
[TD="align: right"]26/02/2019[/TD]
[TD]Descript 30[/TD]
[/TR]
[TR]
[TD]Name4[/TD]
[TD]Name31[/TD]
[TD]Name58[/TD]
[TD]THING 1[/TD]
[TD="align: right"]31/01/2019[/TD]
[TD]Descript 4[/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD]THING 2[/TD]
[TD="align: right"]28/02/2019[/TD]
[TD]Descript 32[/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD]THING 3[/TD]
[TD="align: right"]27/03/2019[/TD]
[TD]Descript 59[/TD]
[/TR]
</tbody>[/TABLE]
Appreciate all your help. Blessings!
I need to special unpivot some data.
Input:
[TABLE="width: 734"]
<colgroup><col span="3"><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]NAMEA[/TD]
[TD]NAMEB[/TD]
[TD]NAMEC[/TD]
[TD]DATE THING 1[/TD]
[TD]DESCRIPTION[/TD]
[TD]DATE THING 2[/TD]
[TD]DESCRIPTION 2[/TD]
[TD]DATE THING 3[/TD]
[TD]DESCRIPTION 3[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD="align: right"]28/01/2019[/TD]
[TD]Descript 1[/TD]
[TD="align: right"]24/02/2019[/TD]
[TD]Descript 28[/TD]
[TD="align: right"]23/03/2019[/TD]
[TD]Descript 55[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD="align: right"]29/01/2019[/TD]
[TD]Descript 2[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]24/03/2019[/TD]
[TD]Descript 56[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD="align: right"]30/01/2019[/TD]
[TD]Descript 3[/TD]
[TD="align: right"]26/02/2019[/TD]
[TD]Descript 30[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name4[/TD]
[TD]Name31[/TD]
[TD]Name58[/TD]
[TD="align: right"]31/01/2019[/TD]
[TD]Descript 4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]28/02/2019[/TD]
[TD]Descript 32[/TD]
[TD="align: right"]27/03/2019[/TD]
[TD]Descript 59
[/TD]
[/TR]
</tbody>[/TABLE]
Output:
[TABLE="width: 388"]
<colgroup><col><col span="2"><col span="2"><col></colgroup><tbody>[TR]
[TD]NAMEA[/TD]
[TD]NAMEB[/TD]
[TD]NAMEC[/TD]
[TD]TYPE[/TD]
[TD]DATE[/TD]
[TD]DESCRIPTION[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 1[/TD]
[TD="align: right"]28/01/2019[/TD]
[TD]Descript 1[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 2[/TD]
[TD="align: right"]24/02/2019[/TD]
[TD]Descript 28[/TD]
[/TR]
[TR]
[TD]Name1[/TD]
[TD]Name28[/TD]
[TD]Name55[/TD]
[TD]THING 3[/TD]
[TD="align: right"]23/03/2019[/TD]
[TD]Descript 55[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD]THING 1[/TD]
[TD="align: right"]29/01/2019[/TD]
[TD]Descript 2[/TD]
[/TR]
[TR]
[TD]Name2[/TD]
[TD]Name29[/TD]
[TD]Name56[/TD]
[TD]THING 3[/TD]
[TD="align: right"]24/03/2019[/TD]
[TD]Descript 56[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD]THING 1[/TD]
[TD="align: right"]30/01/2019[/TD]
[TD]Descript 3[/TD]
[/TR]
[TR]
[TD]Name3[/TD]
[TD]Name30[/TD]
[TD]Name57[/TD]
[TD]THING 2[/TD]
[TD="align: right"]26/02/2019[/TD]
[TD]Descript 30[/TD]
[/TR]
[TR]
[TD]Name4[/TD]
[TD]Name31[/TD]
[TD]Name58[/TD]
[TD]THING 1[/TD]
[TD="align: right"]31/01/2019[/TD]
[TD]Descript 4[/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD]THING 2[/TD]
[TD="align: right"]28/02/2019[/TD]
[TD]Descript 32[/TD]
[/TR]
[TR]
[TD]Name5[/TD]
[TD]Name32[/TD]
[TD]Name59[/TD]
[TD]THING 3[/TD]
[TD="align: right"]27/03/2019[/TD]
[TD]Descript 59[/TD]
[/TR]
</tbody>[/TABLE]
Appreciate all your help. Blessings!