ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sequencial sort (https://www.excelbanter.com/excel-programming/380353-sequencial-sort.html)

Curt

sequencial sort
 
is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Martin Fishlock

sequencial sort
 
Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Martin Fishlock

sequencial sort
 
Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then other. Do
you know of any documention about this so I may study. Will try excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Curt

sequencial sort
 
Have not got the answer yet. Do have code that will sort in macro 1234. Have
not figured how to get it to go the rest of way. Want to be able to go to 8
or maybe more or less. Depends on entries in parade. I took on a freebie job
over my head I think. Will work with helper also to see how it does. Let me
know if you want code I will send.


"Martin Fishlock" wrote:

Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then other. Do
you know of any documention about this so I may study. Will try excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Curt

sequencial sort
 
Did sort with helper did not get needed got 1122334455667788 needed 12345678
and repeat to end of column many entries 1 thru eight scrambled as they come
in.

"Martin Fishlock" wrote:

Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then other. Do
you know of any documention about this so I may study. Will try excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Martin Fishlock

sequencial sort
 
Curt,

Why don't you send me the excel file with data and details of how you want
it and I will see if I can do it to hiss
(delete the .cutthis).
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Did sort with helper did not get needed got 1122334455667788 needed 12345678
and repeat to end of column many entries 1 thru eight scrambled as they come
in.

"Martin Fishlock" wrote:

Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then other. Do
you know of any documention about this so I may study. Will try excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a 12345678
order then repeat again,and again until complete column is sorted? All groups
being 12345678.


Tom Ogilvy

sequencial sort
 
If you want to sort ROWS in groups of 8, why sort on groups of 4 as you are
doing now. Adjust your code like this:

Sub tst_1()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Row Step 8
Range(Cells(t, 3), Cells(t + 7, 3)).Select
Selection.EntireRow.Sort Key1:=Cells(t,3),_
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Next
End Sub

Using my previous recommendation fit to your data, you could do it with one
sort, no loop, actually no code required.



--
Regards,
Tom Ogilvy



"Curt" wrote in message
...
The code follows The file with data only is scrambled entries not in
sequence
needs to be a column with 12345678 12345678 This would be a2:a17t column .
Want column to sort 12345678 then repeat again until column is complete
sorted. Sorted column could be up to 100 maybe more. Hope this explains
best
I can.
The code I have seems to sort 1234 and stops. It then leaves the 4 sorted
cells blocked.
Sub tst_1()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Column Step 8
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2:c100"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Next
End Sub
Once I get this sort working Them I feel I can go on.
Thanks so much for the help at my age it is a real learning curve but I
enjoy it.
Thanks Again



"Martin Fishlock" wrote:

Curt,

Why don't you send me the excel file with data and details of how you
want
it and I will see if I can do it to
hiss
(delete the .cutthis).
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Did sort with helper did not get needed got 1122334455667788 needed
12345678
and repeat to end of column many entries 1 thru eight scrambled as they
come
in.

"Martin Fishlock" wrote:

Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the
task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and
then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header
row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then
other. Do
you know of any documention about this so I may study. Will try
excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I
started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a
12345678
order then repeat again,and again until complete column is
sorted? All groups
being 12345678.




Tom Ogilvy

sequencial sort
 
You posted sample code that is sorting on column C, but your first post said
your data was in column B. You also appear to want to sort the rows out to
column t, so the information I gave you would be put in column U and you
would sort on U as your primary key, and C as your secondary key.

=countif($C$1:C1,C1)

Why you are looping is a mystery and could mean the problem is much
different than what you describe or that is isn't necessary (more likely).

The code I have seems to sort 1234 and stops. It then leaves the 4 sorted
cells blocked.


What that means is a mystery.

With a clear statement of the problem and a clear understanding of your data
this could be accomplished in minutes rather than the days you have played
around with it.



--
Regards,
Tom Ogilvy


"Curt" wrote in message
...
The code follows The file with data only is scrambled entries not in
sequence
needs to be a column with 12345678 12345678 This would be a2:a17t column .
Want column to sort 12345678 then repeat again until column is complete
sorted. Sorted column could be up to 100 maybe more. Hope this explains
best
I can.
The code I have seems to sort 1234 and stops. It then leaves the 4 sorted
cells blocked.
Sub tst_1()
Dim t
For t = 2 To Cells(100, 3).End(xlUp).Column Step 8
Range(Cells(t, 3), Cells(t + 3, 3)).Select
Selection.Sort Key1:=Range("C2:c100"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Next
End Sub
Once I get this sort working Them I feel I can go on.
Thanks so much for the help at my age it is a real learning curve but I
enjoy it.
Thanks Again



"Martin Fishlock" wrote:

Curt,

Why don't you send me the excel file with data and details of how you
want
it and I will see if I can do it to
hiss
(delete the .cutthis).
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Did sort with helper did not get needed got 1122334455667788 needed
12345678
and repeat to end of column many entries 1 thru eight scrambled as they
come
in.

"Martin Fishlock" wrote:

Curt

Sorry, didn't pick up your reply.

Did you solve your problem?

A helper column is simply a new column that is used to help to do the
task.

So if your numbers are in column A "insert" a new column next to A
and if you have headings in row 1 put in the new heading "Helper" and
then
in the new column under the header enter

a=INT((ROW()-1)/8)

copy this down for the entire list

then copy and paste special values the new column

the sort on the new column as 1 and the list as 2 (clicking header
row)


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

Not familar with helper column don't catch on to sort helper then
other. Do
you know of any documention about this so I may study. Will try
excel help
maybe be there.
Thank You so much

"Martin Fishlock" wrote:

Use a helper column with a formula like

=INT((ROW()-1)/8)

you may need to adjust the -1 depending on the start row, I
started in row 1.

then copy it down and then copy space special values.

then sort on the helper column and then the column with 12345678.


--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Curt" wrote:

is it possible to sort a column with many entries 1 thru 8 in a
12345678
order then repeat again,and again until complete column is
sorted? All groups
being 12345678.





All times are GMT +1. The time now is 07:50 PM.

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