How to sort using vba

Closed
gvgbabu Posts 5 Registration date Friday September 6, 2013 Status Member Last seen September 17, 2013 - Sep 16, 2013 at 11:36 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 17, 2013 at 08:00 AM
Hello,


i have a table with
1 230 450 1 301
2 230 450 2 340
7 230 450 7 350
65 230 450 301 501
67 230 450 340 502
71 230 450 350 546
129 230 450 501 701
131 230 450 502 702
135 230 450 546 747


i want to sort in order that

select 1st column having number "1"
row containing "1" number 5th column text is "301"
2nd row should be 4th column with "301"
it has 5th column "501"
3rd row should be 4th column with 501 and so on untill there no number matching 5th and 4th column

Then select "2" in the 1st column and do the same

this process goes on end of the 1st column

the above example should have
1 230 450 1 301
65 230 450 301 501
129 230 450 501 701
2 230 450 2 340
67 230 450 340 502
131 230 450 502 702
7 230 450 7 350
71 230 450 350 546
135 230 450 546 747

please guide me

gvg

3 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 17, 2013 at 02:14 AM
the sheet will be like this and see helper column(col F)
now sort according to helper column
is this what you want.


hdng1 hdng2 hdn5 hdng4 hdng5 "helper
collumn"
1 230 450 1 301 1
2 230 450 2 340 4
7 230 450 7 350 7
65 230 450 301 501 2
67 230 450 340 502 5
71 230 450 350 546 8
129 230 450 501 701 3
131 230 450 502 702 6
135 230 450 546 747 9


by the ;by what is the logic?
0
gvgbabu Posts 5 Registration date Friday September 6, 2013 Status Member Last seen September 17, 2013
Sep 17, 2013 at 05:58 AM
hi venkat

here i have given 9 rows data for example

actually there will be more than 1500 rows with this data

it very tedious to insert the helper column nos.

gvg
0
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 17, 2013 at 08:00 AM
then what is the logic
what is the connection
1, 65, 129,,2,67, 131
0