Hi, mdmackillop....Thank you for quick response!! However, it's not workable.
Hi, p45cal.............Thank you for reviewing!!! After changing code, it is workable now.
Sub Test()
LR = Cells(Rows.Count, 7).End(xlUp).Row
Columns("$G:$G").AutoFilter
Range("$G$4:$G" & LR).AutoFilter Field:=1, Criteria1:="=" & LastDate(7) & "*"
End Sub
Function LastDate(Col) As String
Dim r As Range, dt As Date, ld As Date
Set r = Range(Cells(5, Col), Cells(Rows.Count, Col).End(xlUp))
ld = 0
For Each cel In r
dt = DateSerial(Mid(cel, 7, 4), Left(cel, 2), Mid(cel, 4, 2))
If dt > ld Then ld = dt
Next
LastDate = Format(ld, "mm/dd/yyyy")
End Function