Option Explicit
Public Const Days As Date = #4/30/2018#
Public Sub XoaDuLieu()
Dim ws As Worksheet, aTmp, fDate As Date
Dim Rng As Range, i As Long, lastRow As Long
Application.DisplayAlerts = False
For Each ws In Worksheets
With ws
lastRow = .Range("A" & Rows.Count).End(xlUp).Row
If lastRow >= 10 Then
For i = lastRow To 10 Step -1
fDate = Format(.Range("A" & i), "dd/mm/yy")
aTmp = Split(fDate, "/")
fDate = DateSerial(aTmp(2), aTmp(1), aTmp(0))
If fDate < Days Then
If Rng Is Nothing Then
Set Rng = .Range("A" & i).EntireRow
Else
Set Rng = Union(Rng, .Range("A" & i).EntireRow)
End If
End If
Next
End If
If Not Rng Is Nothing Then
'Rng.Delete
Rng.Interior.Color = 65535
End If
End With
Set Rng = Nothing
Next ws
Application.DisplayAlerts = True
End Sub