Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range, Luu As Variant, DK As String
Application.ScreenUpdating = False
If Target.Address = "$D$4" Then
DK = Choose([D4], "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
Range("A5:D" & [D65536].End(xlUp).Row).ClearContents
Set Rng = Sheets("DS").[A3].CurrentRegion
Luu = Rng.Value
With Rng
.Offset(, 2).Resize(, 1).NumberFormat = "mmm"
.Sort Key1:=Rng(2, 3), Order1:=1, Header:=1, OrderCustom:=4
.AutoFilter Field:=3, Criteria1:=DK
.SpecialCells(xlCellTypeVisible).Copy
[A5].PasteSpecial xlPasteValues
.AutoFilter
.Value = Luu
.Offset(, 2).Resize(, 1).NumberFormat = "dd/mm/yyyy"
End With
With Range("A6:A" & [A65536].End(xlUp).Row)
.Formula = "=Row(1:" & .Rows.Count & ")"
.Value = .Value
End With
[D4].Select
End If
End Sub