Thread: [Solved] question about sorting
View Single Post
 
Old 01-18-2024, 01:28 AM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Code:
Option Explicit

Sub SortAlphabeticalA()
    Range("A3:A1000").Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlNo
End Sub

Sub SortAlphabeticalB()
    Range("B3:B1000").Sort Key1:=Range("B3"), Order1:=xlAscending, Header:=xlNo
End Sub

Sub SortAlphabeticalADwn()
    Range("A3:A1000").Sort Key1:=Range("A3"), Order1:=xlDescending, Header:=xlNo
End Sub

Sub SortAlphabeticalBDwn()
    Range("B3:B1000").Sort Key1:=Range("B3"), Order1:=xlDescending, Header:=xlNo
End Sub
Attached Files
File Type: xlsm example for excel forum.xlsm (16.2 KB, 4 views)
Reply With Quote