» Delete all cells with today's date using VBA
CATEGORY - Date & Time in VBA
VERSION - All Microsoft Excel Versions
Answer: Insert the following code in the appropriate modules.
Place the code below into the standard module
Sub Tryclear()
Dim intCounter As Integer, intLastRow As Integer
intLastRow = Cells(Rows.Count, 6).End(xlUp).Row
For intCounter = intLastRow To 1 Step -1
If Not IsEmpty(Cells(intCounter, 6)) And _
CDbl(Cells(intCounter, 6).Value) < CDbl(Date) Then
Rows(intCounter).Delete
End If
Next intCounter
End Sub
Book Store:
Recommended Books:
No comments have been submitted.

