Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter-sorting from specified cell
Hello,
I´m trying to with autofilter, everything i working fine but I want to sort after a specified cell, in this case D5. Do anyone know how to do this? My code is: Sub Januari() ' ' Sortera januari i betaltlistan Makro ' ' ActiveSheet.Unprotect ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter Field:=5, Criteria1 _ :="$D5" ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter Field:=32, Criteria1 _ :="<" End Sub Keep my fingers krossed. BR Mia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter-sorting from specified cell
If someones intrested, I solved it myself. I used following code:
Sub Januari() ' ' Sortera januari i betaltlistan Makro ' ' ActiveSheet.Unprotect Dim val As String val = ActiveSheet.Range("D5") ActiveSheet.ListObjects("Tabell101226").Range.Auto Filter ActiveSheet.ListObjects("Tabell101226").Range.Auto Filter Field:=5, Criteria1 _ :=val ActiveSheet.ListObjects("Tabell101226").Range.Auto Filter Field:=32, Criteria1 _ :="<" End Sub "Mia" skrev: Hello, I´m trying to with autofilter, everything i working fine but I want to sort after a specified cell, in this case D5. Do anyone know how to do this? My code is: Sub Januari() ' ' Sortera januari i betaltlistan Makro ' ' ActiveSheet.Unprotect ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter Field:=5, Criteria1 _ :="$D5" ActiveSheet.ListObjects("Tabell1012").Range.AutoFi lter Field:=32, Criteria1 _ :="<" End Sub Keep my fingers krossed. BR Mia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enabling Autofilter and Sorting in a Protected Sheet | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
Autofilter/Sorting Copying Wrong records | Excel Discussion (Misc queries) | |||
Sorting after autofilter | Excel Programming | |||
Sorting with AutoFilter | Excel Discussion (Misc queries) |