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
  • this is basic excel feature- click B1 and run sorting ascending... – Kazimierz Jawor Jun 8 '13 at 12:47
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
    This will sort data in ALL rows, not just the row filtered. – music2myear Jan 19 '17 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.
-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.

  • 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 '15 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy