Reputation: 21
I have a word in each row that I want to sort. It does not matter which of the words comes first as long as they are sorted. Below is an example of my excel sheet where I have replaced the word with one single letter instead. Is it possible to write a macro to help me to sort?
Thanks in advance!
Column 1
x
y
x
z
x
y
Upvotes: 0
Views: 814
Reputation: 1132
use below line
Range("A1").Sort key1:=Range("A1"), order1:=xlDescending, Header:=xlYes
Upvotes: 1