• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel Sorting Problem

ananthram

New Member
dear sir,


i have a problem on sorting the table like in example below


col A Col B

1212 2121

2121 1212

2323 2121

2121 2323

2525 2545

2545 2525

2565 2145

2145 2565


now i need col B to sort as col A exactly. please help me with the sort option and this should be used for mass data as because i can't use this as a custom list as it exceeds 255 chars.
 
Hi Ananthram ,


I am confused by your problem description ; can you explain the meaning of this :

[pre]
Code:
i need col B to sort as col A exactly.
[/pre]
Narayan
 
thanks for your quick response sir but i need to order the col B which is similar to col A


in the sense when sorted both should look same, which i will be working on this for 1000's of data so please help me sir.
 
Hi Ananthram ,


I am still confused ; let us replace the numbers you have given by serial numbers ; your data will now look like this :

[pre]
Code:
1      2
2      1
3      4
4      3
5      6
6      5
7      8
8      7
If we now sort the data on column B , what we will have is :

2      1
1      2
4      3
3      4
6      5
5      6
8      7
7      8
[/pre]
Is this what you want ?


Narayan
 
Sir,


i don't need that in order like a to z sort, but the sort how it is in col A like the jumbled/replaced numbers.
 
Hi Ananthram ,


I am sorry but I cannot understand your requirement , nor am I able to make you understand my confusion !


If we take your data sample , and make column B look like column A , will it be like this :

[pre]
Code:
2121	     1212
1212	     2121
2121	     2323
2323	     2121
2545	     2525
2525	     2545
2145	     2565
2565	     2145
[/pre]
What I see is that if the order of column B is to be the same as the order of column A , then column A will take on the order of column B ; basically , you can just swap the data in columns A and B.


Narayan
 
Hum...


If we look closely both the coloum has same and equal values. Just the B coloum values are shuffled.


To my understanding ananthram want coloum B be to sort like coloum A means


Match coloum B values to coloum A and place the value in adjecent to coloum A. A index match should work if ananthram confirm this.


Regards,
 
sir i am really sorry for the confusion but now the these column doesn't look same. What i need is if i use sort both the column should be true when i put =(reference)=(reference)


if col A is jumbled then the col B should be jumbled in the same order as col A.
 
Hi Ananthram ,


From what little I have understood , you want that column B should look like column A ; why not just copy column A to column B ?!


Narayan
 
Hi ananthram,


You can simply use VLOOKUP() like below, but let me say that your problem is still unclear:


Code:
=VLOOKUP(A1,$A$1:$A$8,1,FALSE)


Your data is in column A.


Regards,
 
Hi, ananthram!


Give a look at this file:

https://dl.dropbox.com/u/60558749/Excel%20Sorting%20Problem%20%28for%20ananthram%20at%20chandoo.org%29.xlsx


Columns:

A:B : your data

C: helper column

D: position of B in A

E: B as A


Just advise if any issue.


Regards!
 
Hi, ananthram!

Glad you solved it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.

Regards!

PS: If planning to donate a Ferrari don't forget to donate a bicycle to Chandoo too ;)
 
Back
Top