Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Worksheets
Automatic Sorting?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Otto Moehrbach, post: 3853519"] Ted VBA can do that too. But be aware that the macro would have to have a trigger (to tell it when to run). I could write the macro to do the sort whenever a change occurs in column A or B or F. That would be the trigger. Since you want to sort by only those 3 columns, any changes in any other columns would not effect the state of the sorted data. If this is what you want, the following macro will do that. Note that this macro is a sheet event macro and MUST be placed in the sheet module of your sheet, not in a regular module. Access that module by right-clicking on the sheet tab and selecting View Code. Paste this macro into that module. "X" out of the module to return to your sheet. HTH Otto Private Sub Worksheet_Change(ByVal Target As Range) Dim rColA As Range Set rColA = Range("A3", Range("A" & Rows.Count).End(xlUp)) If Not Intersect(Target, rColA) Is Nothing Or _ Not Intersect(Target, rColA.Offset(, 1)) Is Nothing Or _ Not Intersect(Target, rColA.Offset(, 5)) Is Nothing Then rColA.Resize(, 23).Sort Key1:=Range("F3"), Order1:=xlAscending, _ Key2:=Range("B3"), Order2:=xlAscending, _ Key3:=Range("A3"), Order3:=xlAscending, _ Header:=xlNo, OrderCustom:=1, _ MatchCase:=False, Orientation:=xlTopToBottom End If End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Worksheets
Automatic Sorting?
Top