Consulting

Results 1 to 3 of 3

Thread: sorting data by cell value

  1. #1

    sorting data by cell value

    Hello,
    Is it easily possible to sort data by value at column AK by this key via VBA?
    before...
    Column AK Column AL Column AM
    Row3 33 Paul P
    Row4 12 Mike M
    Row5 25 George G
    after

    Column AK Column AL Column AM
    Row3 12 Mike M
    Row4 25 George G
    Row5 33 Paul P

    range of row 3 to 5 is just for ilustration. In real it start at row 3 and end with last row with data at column AK.

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    Sub test()
        
        With Range("ak3", Range("ak" & Rows.Count).End(xlUp)).Resize(, 3)
            .Sort .Columns(1), Header:=xlNo
        End With
        
    End Sub

  3. #3
    Thank you Mana, this is great:-)

Posting Permissions

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