Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to creat a userform in excel macro. which on clicking will sort the excel.
I have an excel in a following way.
COL-A COL-B
1     q
1     a
1     a
1     g
1     l
1     t
2     i
2     j
4     p
4     f
5     y
5     x
6     m
7     b


I want to sort it in the following way.

COL-A    COL-B    COL-C    COL-D    COL-E    COL-F   COL-G    COL-H
1          q        a        a        g        l       
           t

2          i        j

4          p        f

5          y        x

6          m       
 
7          b


as seen 1 is appearing 5 times in columb-A so whatevery values are corresponding to
1...should be arranged in diff columb but max 5 columb should be used. likewise the other columbs


[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 31-Aug-12 0:34am
v2
Comments
OriginalGriff 31-Aug-12 6:34am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Mehdi Gholam 31-Aug-12 7:47am    
Very strange way to do things, why?
ZurdoDev 31-Aug-12 8:25am    
You can start a loop counter at 1 and go to cell A1. Then get its value and copy to B on another sheet. Then go to row 2 in your loop and if the value is the same, copy to column C. Just use variables to keep track of when things change and what column and row to right to. It shouldn't be that bad.
Avinash.aswani 31-Aug-12 9:29am    
ya ur correct thats what i also wish to do. but i dnt knw macro coding. Can you help me with it?
ZurdoDev 31-Aug-12 9:55am    
The easiest thing to do is to record a macro doing at least part of what you want. That will get you started and then I can help. What version of Excel is it?

1 solution

Guys please help me with the code if possible it wil be a great help
 
Share this answer
 
Comments
Joan M 4-Sep-12 6:29am    
Putting an answer to your question is like shooting to your own foot.
Now your question looks already answered and plenty of people won't look at it...
I've reported your answer as not being one, you could delete it already to gain time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900