sort 2 columns with "large"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been told I can sort column A with the "large" command, and have associated names in column B sort the same way if I select both columns together and then sort by "large",- but I don't understand how to do this. Where do I put the command? When do I select the 2 columns? Exactly what does the command look like? e.g. If ages 10, 20, and 15 are placed in cells A1, A2, and A3, and names X, Y, and Z are in cells B1, B2, and B3; where do I put the command and what does it look like, to sort column A in descending order and keep the same names associated with the ages in the column beside it? Thank you for your help. Dan
 
To do this manually, select all the data you want sorted. On the menu click
Data/Sort. Choose the column to want all the data to sort by (column A for
age) and select Descending if you want the oldest age listed first.

Dan Kraemer said:
I have been told I can sort column A with the "large" command, and have
associated names in column B sort the same way if I select both columns
together and then sort by "large",- but I don't understand how to do this.
Where do I put the command? When do I select the 2 columns? Exactly what
does the command look like? e.g. If ages 10, 20, and 15 are placed in cells
A1, A2, and A3, and names X, Y, and Z are in cells B1, B2, and B3; where do
I put the command and what does it look like, to sort column A in descending
order and keep the same names associated with the ages in the column beside
it? Thank you for your help. Dan
 
If you want VBCode to do this, try this:

Sub SortBy_Oldest()

Range("A1").Select
Selection.CurrentRegion.Select
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

Mike


Dan Kraemer said:
I have been told I can sort column A with the "large" command, and have
associated names in column B sort the same way if I select both columns
together and then sort by "large",- but I don't understand how to do this.
Where do I put the command? When do I select the 2 columns? Exactly what
does the command look like? e.g. If ages 10, 20, and 15 are placed in cells
A1, A2, and A3, and names X, Y, and Z are in cells B1, B2, and B3; where do
I put the command and what does it look like, to sort column A in descending
order and keep the same names associated with the ages in the column beside
it? Thank you for your help. Dan
 
Back
Top