Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting with macro
Hi,
I'm trying to sort a list after a specified cell. The cell is in a date format and I want to see all items in the list that are before this date or if the cell in the list are empty. I also want to sort at the same way in a another column in at the sam time. My code so far is as follows, but I don't get it to work proparly. ActiveSheet.Unprotect Dim Period As Date Period = ActiveSheet.Range("b3") Dim Avslut As Date Avslut = ActiveSheet.Range("B4") ActiveSheet.ListObjects("tabell").Range.AutoFilter ActiveSheet.ListObjects("Astratabell").Range.AutoF ilter Field:=21, Criteria1 _ :="<Period", Operator:=xlAnd ' ActiveSheet.ListObjects("Astratabell").Range.AutoF ilter Field:=21, Criteria1 _ :="=" Period are a date in cell b3 that are changed with "dataverifing" from another sheet. This dates are 2010-01-01, 2010-02-01 and so on... I'll be wery grateful if someone can help me! -- Best regards Mia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with vba/Macro sorting | Excel Programming | |||
Looking for help with a sorting macro. | Excel Programming | |||
Sorting macro | Excel Programming | |||
Macro for Sorting | Excel Programming | |||
Sorting w/Macro | Excel Programming |