Sorting a column based on required order

V

Vasanth

Hi

Below is my requirement

I have 100 rows in a excel . I need to sort this rows based on column
.But this sorting is not ascending or in descending order .I need th
sorting to be done by the order I mention

Eg:


Rows present in Excel



AAA 123
FFF 111
GGG 456
DDD 654
AAA 775
FFF 986
TTT 777


I need the Column A to be sorted in this order


DDD
TTT
AAA
FFF
GGG


Hence my output must be like this



DDD 654
TTT 777
AAA 123
AAA 775
FFF 986
FFF 986
GGG 456

Please let me know whether this can be achieved with excel macro o
formulas
 
H

Hate-Excel-Need

I'm not sure this is the best approach, but it's what I know and i
should work.



Presumably you have a limited number of values possible in column A.

If so, you could build an array in a seperate worksheet.

DDD 1
TTT 2
AAA 3
FFF 4
GGG 5

Then you could reference that array wit
=VLOOKUP(A:A,arraysheet!A:B,2,FALSE) in an extra column in your mai
sheet to generate a column to sort by.


AAA 123 3
FFF 111 4
GGG 456 5
DDD 654 1
AAA 775 3
FFF 986 4
TTT 777 2


Hope that helps
 
J

JimRamos

Hate-Excel-Need;1600967 said:
I'm not sure this is the best approach, but it's what I know and i
should work.



Presumably you have a limited number of values possible in column A.

If so, you could build an array in a seperate worksheet.

DDD 1
TTT 2
AAA 3
FFF 4
GGG 5

Then you could reference that array wit
=VLOOKUP(A:A,arraysheet!A:B,2,FALSE) in an extra column in your mai
sheet to generate a column to sort by.


AAA 123 3
FFF 111 4
GGG 456 5
DDD 654 1
AAA 775 3
FFF 986 4
TTT 777 2


Hope that helps.

Add a custom list:
for excel 2010:
Fille\Excel Options\Advanced\Edit Custom Lis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top