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

2
  • look here:stackoverflow.com/q/152319/382588 Commented Oct 22, 2016 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 Commented Oct 22, 2016 at 16:20

1 Answer 1

1

use below line

Range("A1").Sort key1:=Range("A1"), order1:=xlDescending, Header:=xlYes
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.