VBA Code to Sort Range in Excel

This code sorts the selected range in ascending order.

VBA Code:

Sub SortRange()
    Selection.Sort Key1:=Selection, Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

Check All VBA Codes

Join Our Telegram Group techguruplus telegram group Join Our WhatsApp Group techguruplus whatsapp group

Leave a Comment