Need a macro to run sort automatically

M

Mike Fogleman

I don't open attachments but here is sample code for one method -

Sub SortNewList()
Range("A5").Select 'select a cell within the list.
Selection.CurrentRegion.Select 'selects everything adjoining that cell.
Selection.Sort Key1:=Range("F5"), Order1:=xlAscending, Key2:=Range("D5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=
_
False, Orientation:=xlTopToBottom 'Change criteria to fit your
list needs.
Range("A1").Select 'Begining of sheet.
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top