-
Sorting through two lists
Hey everyone.
Im trying to sort information through one column first then the second column. Eg:
1 2
1 3
2 2
1 1
2 1
should be
1 1
1 2
1 3
2 1
2 2
but its
1 2
1 3
1 1
2 2
2 1
Im using:
Range(Cells(2, 1), Cells(8, 8)).Sort Key1:=Cells(2, 1)
at the moment.
Any help greatly appreciated.
-
You just left out the second sort key. Try:
[VBA]Range(Cells(2, 1), Cells(8, 8)).Sort Key1:=Cells(2, 1), Key2:=Cells(2, 2)[/VBA]
Mark
-
Thanks Mark, you're a legend!
-
Me? Not even close, more at, "hey, I think I got that one right!"
Thanks though and happy to help,
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules