0

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

Ken Neth
  • 21
  • 1
  • 3
  • look here:http://stackoverflow.com/q/152319/382588 – Asaf Oct 22 '16 at 16:16
  • start recording a Macro, do your sorting with excel (Data-> Sort) and when you're done stop the macro. Finally open VEB editor (ALT+F11) and see the code – user3598756 Oct 22 '16 at 16:20

1 Answers1

1

use below line

Range("A1").Sort key1:=Range("A1"), order1:=xlDescending, Header:=xlYes
Aditya Pansare
  • 1,112
  • 9
  • 14