Automatic Sort

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

Guest

OK... I have a schedule file that gets updated hourly by non-excel type
people. I want the spreadsheet to sort by column N every time a change,
addition, deletion of anything is done to the spreadsheet... how do I go
about doing this/
 
Hi Chris,

With an event macro stored in the worksheet module :
Private Sub Worksheet_Calculate()
' Adjust to Your Range
Selection.Sort Key1:=Range("YourCell"), Order1:=Ord,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

HTH
Cheers
Carim
 
Great... last question... where do I learn this stuff.... I'm an access
programmer but this is a little different...
 
How do I adjust the range... I want the range to sort by column C... I tried


Private Sub Worksheet_Calculate()
Selection.Sort Key1:=Range("C"), Order1:=Ord,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

I also tried:
Private Sub Worksheet_Calculate()
Selection.Sort Key1:=Range("C2,C300"), Order1:=Ord,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

I also tried:
Private Sub Worksheet_Calculate()
Selection.Sort Key1:=Range("C2:C300"), Order1:=Ord,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
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

Back
Top