# Copying the sorted data and it’s relevant columns together in new columns

Hi everyone.

Consider there are 3 columns. I want to sort the 3rd column, in a way that the sorted data of the 3rd column are now in the 4th column. I do this with the function “Large” and it is okay. The problem is that I want to the other two first columns be somehow attached to the 3rd column. Consider this example:

A B C

1 0.2 90

2 0.5 30

3 0.3 100

I want to have these three new columns:

D E F

3 0.3 100

1 0.2 90

2 0.5 30

In fact, the D and E column correspond to A and B column respectively. The A and B columns are somehow attached to the C column, and when I sort the C column, both other columns changes according to the sorting of the C column. Furthermore, I want three new columns (as I showed above, like D, E, and F), so this means that only sorting the C column in its own column is not favorable for my case. I need a function that does such a thing and makes me those three new columns.

I hope I explained my problem fully and easily.

I will appreciate any help from you guys!