Need some help in restructure worksheet with VBA

lynn8566

New Member
Joined
Apr 7, 2011
Messages
18
Hello

i have some excel sheet with large volume rows inside. now for statistic purpose i need to restructure the shape of worksheet, but i really dont know if it will works, can someone help.

the worksheet will looks like

Code:
[RANGE=cls:xl2bb-100][XR][XH=cs:9]Excel Workbook[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][XH]D[/XH][XH]E[/XH][XH]F[/XH][XH]G[/XH][XH]H[/XH][/XR][XR][XH]1[/XH][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]ID[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Date[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]TOP[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Thema[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]B/V/I[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]B-/V-Nummer[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Name[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Appointment[/XD][/XR][XR][XH]2[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]TOP 1[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][/XR][XR][XH]3[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]Subtopic[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][/XR][XR][XH]4[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]V[/XD][XD=h:r|fw:b|fz:11pt]1[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fw:b|fz:11pt]2010/9/7[/XD][/XR][XR][XH]5[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]V[/XD][XD=h:r|fw:b|fz:11pt]3[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fw:b|fz:11pt]2010/9/7[/XD][/XR][XR][XH]6[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]Subtopic[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:r|fw:b|fz:11pt]4[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][/XR][XR][XH]7[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]V[/XD][XD=h:r|fw:b|fz:11pt]2[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fw:b|fz:11pt]2010/12/7[/XD][/XR][XR][XH]8[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]V[/XD][XD=h:r|fw:b|fz:11pt]5[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fw:b|fz:11pt]2010/12/7[/XD][/XR][XR][XH]9[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]B[/XD][XD=h:r|fw:b|fz:11pt]4[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]10[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]TOP 2[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]Model xxx- meeting at xxx[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]S. Hans, DE/PEE[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]*[/XD][/XR][XR][XH]11[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]Subtopic[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][/XR][XR][XH]12[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]B[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][/XR][XR][XH]13[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fw:b|fz:11pt]V[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]S. Hans, DE/PEE[/XD][XD=h:r|fw:b|fz:11pt]2010/2/2[/XD][/XR][XR][XH]14[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]Subtopic[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][XD=h:l|fw:b|fz:11pt]*[/XD][/XR][XR][XH=cs:9][RANGE][XR][XD]Sheet1[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE]

and i need it to be like
Code:
[RANGE=cls:xl2bb-100][XR][XH=cs:10]Excel Workbook[/XH][/XR][XR][XH][/XH][XH]A[/XH][XH]B[/XH][XH]C[/XH][XH]D[/XH][XH]E[/XH][XH]F[/XH][XH]G[/XH][XH]H[/XH][XH]I[/XH][/XR][XR][XH]1[/XH][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]ID[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Date[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]TOP[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Topic[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Thema[/XD][XD=h:l|fw:b|bc:c0c0c0|fz:11pt]B/V/I[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]B-/V-Nummer[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Name[/XD][XD=h:c|fw:b|bc:c0c0c0|fz:11pt]Appointment[/XD][/XR][XR][XH]2[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Subtopic[/XD][XD=h:l]*[/XD][XD=h:l]*[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]3[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]V[/XD][XD=h:r|fz:11pt]1[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]4[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]V[/XD][XD=h:r|fz:11pt]3[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fz:11pt]2010/9/7[/XD][/XR][XR][XH]5[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Subtopic[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fz:11pt]2010/9/7[/XD][/XR][XR][XH]6[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]V[/XD][XD=h:r|fz:11pt]2[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]7[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l]Top1[/XD][XD=h:l]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]V[/XD][XD=h:r|fz:11pt]5[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fz:11pt]2010/12/7[/XD][/XR][XR][XH]8[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]Top1[/XD][XD=h:l|fz:11pt]Meeting at 20/3 Building 4x135 - Formale Checking[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]B[/XD][XD=h:r|fz:11pt]4[/XD][XD=h:l|fz:11pt]R. Peter, EP/GEL[/XD][XD=h:r|fz:11pt]2010/2/2[/XD][/XR][XR][XH]9[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]TOP 2[/XD][XD=h:l|fz:11pt]Model xxx- meeting at xxx[/XD][XD=h:l|fz:11pt]Subtopic[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]S. Hans, DE/PEE[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]10[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]TOP 2[/XD][XD=h:l|fz:11pt]Model xxx- meeting at xxx[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]B[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]*[/XD][/XR][XR][XH]11[/XH][XD=h:r|fz:11pt]01/10[/XD][XD=h:r|fz:11pt]2010/1/19[/XD][XD=h:l|fz:11pt]TOP 2[/XD][XD=h:l|fz:11pt]Model xxx- meeting at xxx[/XD][XD=h:l|fz:11pt]Blablabla[/XD][XD=h:l|fz:11pt]V[/XD][XD=h:l|fz:11pt]*[/XD][XD=h:l|fz:11pt]S. Hans, DE/PEE[/XD][XD=h:r|fz:11pt]2010/2/2[/XD][/XR][XR][XH=cs:10][RANGE][XR][XD]Sheet2[/XD][XH][/XH][/XR][/RANGE][/XH][/XR][/RANGE]

the only way you can identical the topic is that in the column C, the same row it will be TOP x.

is it possible to do that?
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Probably best remove the code tags from those examples so we can see what's going on.
 
Upvote 0
try again.

Excel Workbook
ABCDEFGH
1IDDateTOPThemaB/V/IB-/V-NummerNameAppointment
201/102010/1/19TOP 1Meeting at 20/3 Building 4x135 - Formale Checking**R. Peter, EP/GEL*
301/102010/1/19*Subtopic****
401/102010/1/19*BlablablaV1R. Peter, EP/GEL2010/9/7
501/102010/1/19*BlablablaV3R. Peter, EP/GEL2010/9/7
601/102010/1/19*Subtopic*4R. Peter, EP/GEL*
701/102010/1/19*BlablablaV2R. Peter, EP/GEL2010/12/7
801/102010/1/19*BlablablaV5R. Peter, EP/GEL2010/12/7
901/102010/1/19*BlablablaB4**
1001/102010/1/19TOP 2Model xxx- meeting at xxx**S. Hans, DE/PEE*
1101/102010/1/19*Subtopic****
1201/102010/1/19*BlablablaB***
1301/102010/1/19*BlablablaV*S. Hans, DE/PEE2010/2/2
1401/102010/1/19*Subtopic****
Sheet1


then desired format

Excel Workbook
ABCDEFGHI
1IDDateTOPTopicThemaB/V/IB-/V-NummerNameAppointment
201/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingSubtopic**R. Peter, EP/GEL*
301/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingBlablablaV1**
401/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingBlablablaV3R. Peter, EP/GEL2010/9/7
501/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingSubtopic**R. Peter, EP/GEL2010/9/7
601/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingBlablablaV2R. Peter, EP/GEL*
701/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingBlablablaV5R. Peter, EP/GEL2010/12/7
801/102010/1/19Top1Meeting at 20/3 Building 4x135 - Formale CheckingBlablablaB4R. Peter, EP/GEL2010/2/2
901/102010/1/19TOP 2Model xxx- meeting at xxxSubtopic**S. Hans, DE/PEE*
1001/102010/1/19TOP 2Model xxx- meeting at xxxBlablablaB***
1101/102010/1/19TOP 2Model xxx- meeting at xxxBlablablaV*S. Hans, DE/PEE2010/2/2
Sheet2


thanks for your concern.

one more thing, there shouldnt have star marks in the first table. it should be blank cell.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,754
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top