1
votes

I have a sheet with data wherein one cell data is in arranged but in another column not so I want to arrange data in 3rd column based on 1st column like bellow

Here is my data Column A has arranged data, Column B is unarranged data.

enter image description here

Now I want to arrange data in Column C and In Column D, Column C copy column A and Column D copy Data From Column B but Paste as it is in Column A.

enter image description here

Update --

 A              | B 
----------------------------------------- 
1st Name        | 3rd Name 
_________________________ 
2nd Name        | 1st Name 
_______________________ 
3rd Name        | 2nd Name

want to arrange data in column B as data in Column A

 A              | B 
----------------------------------------- 
1st Name        | 1st Name 
_________________________ 
2nd Name        | 2nd Name
_______________________ 
3rd Name        | 3rd Name 

Want data like this.

1
What do you mean by "based on column A", could you give example with more precise data for better understandability - amy
Hi, I mean I have the correct version of data in column A , and in Column B data is not correct like in the first image you can see Cell A2 have "a" But in Cell B2 "b" instead of "a" Same thing Column A3 have "b" but in Column B3 "d" instead of "b" so I want to arrange column B data as data in column A . I hope it make some sense, sorry for bad English. - hardy
@amy I just update my question, hope its help you to understand. - hardy

1 Answers

1
votes

to sort by each column priority-wise:

=SORT(A:D, 1, 1, 2, 0, 3, 1, 4, 1)

to sort C column based on A column:

=ARRAYFORMULA(IFNA(VLOOKUP(A:A, C:D, {1, 2}, 0)))

to sort each column independently:

={SORT(A:A), SORT(B:B, 1, 0), SORT(C:C), SORT(D:D)}