M
Mia
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.AutoFilter Field:=21,
Criteria1 _
:="<Period", Operator:=xlAnd
' ActiveSheet.ListObjects("Astratabell").Range.AutoFilter 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!
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.AutoFilter Field:=21,
Criteria1 _
:="<Period", Operator:=xlAnd
' ActiveSheet.ListObjects("Astratabell").Range.AutoFilter 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!