austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
Seems simple but I'm just not there yet....but how do I get excel VBA to sort all the cells in column "G" in alphabetical order from A-Z?
I tried this but I know ist wayyy off:
I tried this but I know ist wayyy off:
Code:
With Range("G" & Rows.Count).Select
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=Range("G1" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.Sort
.SetRange Range("A2:T167")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With