Sorting of data using macros in Excel

KiwiMcSheep

New Member
Joined
Jul 23, 2014
Messages
6
Hello

Any and all help in regards to this is greatly appreciated, I have very little VB knowledge and wish to use a macro in excel to organised a lot of data quickly, that said I'm happy to learn how to code it or if someone can provide a macro which will sort information which will be provided in format of a text file.

import text document will be in the following format

"
Code:
[SIZE=1][I]computer 5  charlie1(c5)      group[/I][/SIZE]


[SIZE=1][I]input Group 1  charliegroup1[/I][/SIZE]

[SIZE=1][I]input  1  charlie input1                 TZ  0     
input  2  charlie input2                 TZ  2 
input  3  charlie input3                 TZ  0 
input  4  charlie input4                 TZ  2   

[/I][/SIZE][SIZE=1][I]computer 5  charlie2(c5)      group[/I][/SIZE]


[SIZE=1][I]input Group 2  charliegroup2[/I][/SIZE]

[SIZE=1][I]input  1  charlie input1                 TZ  0     
input  2  charlie input2                 TZ  2 
input  3  charlie input3                 TZ  3 
[/I][/SIZE]
[SIZE=1][I]input  4  charlie input4                 TZ  0[/I][/SIZE]
"

inputs can vary e.g names and numbers, also to how many per group.

As you know when you copy and paste a text document into excel it copy's all into one column, so i would like to be able to pull the data out of the one column if this is possible to save time sorting it into multiple columns however if it wont work this way i would be happy enough to organize into columns.

I would like it into the format of the following

Code:
[TABLE="width: 366"]
<tbody>[TR]
[TD][I][SIZE=2]charlie1(c5)[/SIZE][/I][/TD]
[TD][/TD]
[TD="align: right"][I][SIZE=2]charliegroup1[/SIZE][/I][/TD]
[TD="align: right"][I][SIZE=2]charliegroup2[/SIZE][/I][/TD]
[TD="align: right"][I][SIZE=2]charliegroup3[/SIZE][/I][/TD]
[TD="align: right"][I][SIZE=2]charliegroup4[/SIZE][/I][/TD]
[TD="align: right"][I][SIZE=2]charliegroup5[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 1[/SIZE][/I][/TD]
[TD][/TD]
[TD][I][SIZE=2]TZ 2[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 2[/SIZE][/I][/TD]
[TD][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 2[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 3[/SIZE][/I][/TD]
[TD][/TD]
[TD][I][SIZE=2]TZ 2[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 3[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 4[/SIZE][/I][/TD]
[TD][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][I][SIZE=2]TZ 2[/SIZE][/I][/TD]
[TD][/TD]
[TD][I][SIZE=2]TZ 0[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 5[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 6[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][I][SIZE=2]input 7[/SIZE][/I][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

And if the "computer 5" to "computer 6" a new sheet be created and fill as per details that follows.

Ok so you now know how i would like to sort this data, can this be done? is anyone able to help with the coding of what im trying to achieve here.

Looking forward to hearing form you.

Thanks.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hello

I'm assuming by the no response that this isn't possible? can someone suggest any alternative to help achieve the same results?

Thanks

Kiwi
 
Upvote 0

Forum statistics

Threads
1,222,903
Messages
6,168,939
Members
452,227
Latest member
sam1121

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