ngocleasing
Thành viên hoạt động
- Tham gia
- 17/10/08
- Bài viết
- 102
- Được thích
- 5
Bác nào chuyển giúp cái thủ tục sau thành hàm đươc không ạ
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("E1").Value 'assume this is the start date
lngEnd = Range("E2").Value 'assume this is the end date
Range("C1:C13").AutoFilter field:=1, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
End Sub
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("E1").Value 'assume this is the start date
lngEnd = Range("E2").Value 'assume this is the end date
Range("C1:C13").AutoFilter field:=1, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
End Sub