ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sorting (https://www.excelbanter.com/excel-discussion-misc-queries/124233-sorting.html)

Curt

sorting
 
is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



excelent

sorting
 
some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Curt

sorting
 
Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



excelent

sorting
 
Hi Curt: im lost ur post dont give me a hint :-)


"Curt" skrev:

Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Curt

sorting
 
Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Curt

sorting
 
Got the declaration now get application defined or object defined error
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

This area is all yellow
Dim xlSortNormal worked for variable have option explic set
some fun eh?
Thanks

"Curt" wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Dave Peterson

sorting
 
DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson

Curt

sorting
 
removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


Dave Peterson

sorting
 
It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson

Curt

sorting
 
i did a sort with excel it sorted as usual 1,s 2s, etc tried macro again it
would not resort to 1234

"Dave Peterson" wrote:

It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson


Dave Peterson

sorting
 
This line would only sort the first 100 rows (maximum 100 rows).

For t = 2 To Cells(100, 3).End(xlUp).Row Step 4

Maybe

For t = 2 To Cells(rows.count, 3).End(xlUp).Row Step 4



Curt wrote:

i did a sort with excel it sorted as usual 1,s 2s, etc tried macro again it
would not resort to 1234

"Dave Peterson" wrote:

It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

Curt

sorting
 
am only useing top 50 rows for testing purpose will add the count and reply
as to performace

"Dave Peterson" wrote:

This line would only sort the first 100 rows (maximum 100 rows).

For t = 2 To Cells(100, 3).End(xlUp).Row Step 4

Maybe

For t = 2 To Cells(rows.count, 3).End(xlUp).Row Step 4



Curt wrote:

i did a sort with excel it sorted as usual 1,s 2s, etc tried macro again it
would not resort to 1234

"Dave Peterson" wrote:

It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


Curt

sorting
 
ends up on line 21 with 18 to 21 blocked

"Dave Peterson" wrote:

This line would only sort the first 100 rows (maximum 100 rows).

For t = 2 To Cells(100, 3).End(xlUp).Row Step 4

Maybe

For t = 2 To Cells(rows.count, 3).End(xlUp).Row Step 4



Curt wrote:

i did a sort with excel it sorted as usual 1,s 2s, etc tried macro again it
would not resort to 1234

"Dave Peterson" wrote:

It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


Dave Peterson

sorting
 
I don't have any more guesses.

Curt wrote:

am only useing top 50 rows for testing purpose will add the count and reply
as to performace

"Dave Peterson" wrote:

This line would only sort the first 100 rows (maximum 100 rows).

For t = 2 To Cells(100, 3).End(xlUp).Row Step 4

Maybe

For t = 2 To Cells(rows.count, 3).End(xlUp).Row Step 4



Curt wrote:

i did a sort with excel it sorted as usual 1,s 2s, etc tried macro again it
would not resort to 1234

"Dave Peterson" wrote:

It looks like it should work if you re-run it.

How do you know it's not running a second time--maybe the data is already sorted
correctly??????

Curt wrote:

removed data option ran and it worked first time will not run again? No other
changes do not understand not running again have tried many times no responce
Thanks

"Dave Peterson" wrote:

DataOption# was added in xl2002.

If you don't use xl2002+, then delete that parm and its value:

Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom



Curt wrote:

Get xlSortNormal as not declared varaible How do I declare this varable?

"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

Curt

sorting
 
ran code sorted first time ok. now I can not get it to run again. have
rescramble nbrs so it should un scramble. Is it possible to go into options
in excell and enter a list that will give 1234 not 111222333444. What would
use as a seperator for numbers. Tried many option for seperation. Also
formastted column as text
this is bugging me.
Thanks


"excelent" wrote:

Hi Curt: im lost ur post dont give me a hint :-)


"Curt" skrev:

Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Curt

sorting
 
I copyed and pasted into a sub ran it it worked first time. then woun't work
again. I started a new wks. Noe when typeing in code. I get to
selection.sortkey1 then := show as problem 'expected expression' hope we can
fix. Got me stumped I am new to this at my age didn't get much training on
these machines.
Thanks for your help

"excelent" wrote:

Hi Curt: im lost ur post dont give me a hint :-)


"Curt" skrev:

Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



Dave Peterson

sorting
 
There is no selection.sortkey1

You'll want to copy and paste from the other workbook's project (or from the
newsgroup posting)--but retyping is where lots of typos can arise.

Curt wrote:

I copyed and pasted into a sub ran it it worked first time. then woun't work
again. I started a new wks. Noe when typeing in code. I get to
selection.sortkey1 then := show as problem 'expected expression' hope we can
fix. Got me stumped I am new to this at my age didn't get much training on
these machines.
Thanks for your help

"excelent" wrote:

Hi Curt: im lost ur post dont give me a hint :-)


"Curt" skrev:

Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson

Curt

sorting
 
checked typo good no mistake when selection.sort key1 removed shows error
maybe I am asking to much from this program to sort in groups in order over
and over.
Thanks


"Dave Peterson" wrote:

There is no selection.sortkey1

You'll want to copy and paste from the other workbook's project (or from the
newsgroup posting)--but retyping is where lots of typos can arise.

Curt wrote:

I copyed and pasted into a sub ran it it worked first time. then woun't work
again. I started a new wks. Noe when typeing in code. I get to
selection.sortkey1 then := show as problem 'expected expression' hope we can
fix. Got me stumped I am new to this at my age didn't get much training on
these machines.
Thanks for your help

"excelent" wrote:

Hi Curt: im lost ur post dont give me a hint :-)


"Curt" skrev:

Better explain of problem.
Have entries in column d First to sort out are A B C D These will go to top.
Remainder are nbrs 1 thru 8 Need to sort in groups of 8 as 1 to 8. Never
tried this befor don't know if possible. Learning new tricks at my age is
fun. Trying to help a parade committee of Vets which I am a part of.
All help is greatly appreciated.


"excelent" wrote:

some like this:
sort data in C2:C100 in step of 4 cells

Sub tst()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 4
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next
End Sub


"Curt" skrev:

is there a way to sort by cells in a column also can you repeat the search
after first group are reached. column has many groups of numbers want to
group by 1 to 4 repeated. have not been able to get it to sort allways puts
all 1s 2s together. Want a 1234 group.
Anyone? I'm beat
thanks



--

Dave Peterson



All times are GMT +1. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com