Results 1 to 14 of 14

Select 1st 2d range, sort, find 2nd, sort, etc

Threaded View

  1. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Select 1st 2d range, sort, find 2nd, sort, etc

    much shorter option of the code, see attachment, run macro "sort_me"

    Sub sort_me()
    Dim a, i As Long
    Application.ScreenUpdating = False: On Error GoTo Handler
    a = Split([e:e].SpecialCells(xlCellTypeConstants, 1).Address, ",")
    For i = 0 To UBound(a)
    Range(a(i)).Resize(Range(a(i)).Rows.Count, 8).Sort Key1:=Range(Split(a(i), ":")(0)).Offset(0, 1), Order1:=xlAscending
    Next: Application.ScreenUpdating = True: On Error GoTo 0
    Exit Sub
    Handler:
    On Error GoTo 0: Exit Sub
    End Sub
    Attached Files Attached Files
    Last edited by watersev; 12-22-2010 at 10:02 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1