5

How do I sort a column according to ascending values in excel, while keeping the respective initial value in the other columns on the same row?

Column A shows the name of a subject. Column B shows a numerical value. I want to sort column B according to ascending value and keep the name of the subject attached. The name of the subject should stay linked to the value that was initially in the same row.

A 4
B 1
C 3
D 2

should become

B 1
D 2
C 3
A 4
1
  • this is basic excel feature- click B1 and run sorting ascending... Jun 8, 2013 at 12:47

7 Answers 7

5

Highlight the column header (first row). In Excel 2007/2010, go to Data and click Filter. This applies a filter to each column that can be used to sort. Click the downward arrow in the column by which you want to sort and and sort as appropriate (in your example, you would click Smallest to Largest).

1
  • 2
    This will sort data in ALL rows, not just the row filtered. Jan 19, 2017 at 23:00
3

You can sort a column (for sample, column A with the initial data) and keep the respective values in other columns using the SMALL function in Excel. See solution below:


Column A

A1 Numbers (Title)       
A2  4                                
A3  1                    
A4  3                 
A5  2

Column B

B1 Sorted Numbers (Title)

B2 =SMALL($A$2:$A$5,ROW(C1))

B3 =SMALL($A$2:$A$5,ROW(C2))

B4 =SMALL($A$2:$A$5,ROW(C3))

B5 =SMALL($A$2:$A$5,ROW(C4))

Excell SMALL Function: Small(array,k). The SMALL function returns the smallest values from a set of values. In our case, the set of values is from A2 to A5 - which is our array, and the k is the position from the smallest to return.

Enter =SMALL(($A$2:$A$5,ROW(C1)) in B2 and drag down to B5.

1

considering that , all alphabetical values are in column A and numeric values are in column B .....then to get your desired o/p as stated in que. while selecting columns first choose column B (because base of your sorting is column B ) and then column A and after selection click on sort lowest to highest . you will get your o/p if and only if u follow the sense of selection........

1
  1. select all the rows you want sort.
  2. go to sort & Filter option in Home tab.
  3. drop down menu will be shown then select Custom Sort.
  4. Popup menu will be appeared
  5. in this menu, select the particular coloum to be sort in the list.
  6. make sure (My data as a header) is marked Ticked.
  7. select sorting order in which order you want to sort.
  8. click ok.
  9. now you will see the contents for the same row has now reflected.
  10. thankyou.
0

I just struggled with the exact same problem after 10 years lol. All the answers here don't seem to help much. Here's how: Select the data (whole table). Click on Sort => Custome sort. Here you can choose which criteria you want to sort, all the respective value would be be kept intact.

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Aug 21, 2023 at 8:46
-1

I have just been through this myself.

What you will need to do is to highlight all the values, then go to Home tab, then Format as Table. Once you have done that, you can just sort things out by clicking on the header.

1
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – Ramhound
    Oct 2, 2015 at 12:02
-1

It’s really very simple; first select the column that need to be shorted followed by clicking on short button then a short warning message will be displayed, just select the expand the selection and confirm by clicking on message short button, you done.

Hope this is of help.

You must log in to answer this question.