Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I know this code automatically sorts a column in ascending order. But what
changes would you have to make to it to get it to sort a range of colums say from A1 to F1 or maybe more? Private Sub Worksheet_Change(ByVal Target As Range) Dim whereIam As Range Set whereIam = ActiveCell If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub End If Range("B1:" & Range("B1").End(xlDown).Address).Select Selection.Sort Key1:=Range("B1"), Order1:=xlAscending 'and back to where you started whereIam.Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatic sorting in excel | New Users to Excel | |||
Automatic sorting in excel | Excel Discussion (Misc queries) | |||
Automatic sorting in Excel? | Excel Discussion (Misc queries) | |||
automatic sorting | Excel Worksheet Functions | |||
Automatic Sorting????? | Excel Discussion (Misc queries) |