Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ashan Kaya   on Jan 03 In MS Office Category.

  
Question Answered By: Baden Smith   on Jan 03

The basis for your macro should be something like:

Range("A1:B14").Select
Selection.Copy
Range("D1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Sort Key1:=Range("E2"), Order1:=xlDescending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal


The macro selects the original columns  (the first two in this case) and
copies them to the 3rd and 4th column. Columns 1 and 3 are names and columns
2 and 4 are marks.

After the Paste, the new columns are the current selection.

This new selection is then sorted by the 4th column  ("E" - marks).

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on sorting columns Or get search suggestion and latest updates.


Tagged: