» 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:
- Understanding Financial Statements
- A Mathematician Plays the Stock Market
- Finance and Accounting for Nonfinancial Managers
- Rich Dad, Poor Dad: What the Rich Teach Their Kids About Money--That the Poor and Middle Class Do Not!
- Absolute Beginner's Guide to Microsoft Excel 2002
- Financial Statement Analysis with S&P insert card
No comments have been submitted.

