I'm trying to delete any rows in column "U" that contain dates (01/01/2012). I'm using Dim P below to do this but am unscucessful. Any help is appreciated. My guess I have the incorrect data type.
Sub expended()y
Sub Over_expended()
'INSERT COLUMN J
'ALL TOTALS AT END
' Del_top_three_rows Macro
'
Rows("1:3").Select
Selection.Delete Shift:=xlUp
'Deletes all Rows that <> "5"
'If Cells(y, 12).Value < 1500 Or Cells(y, 12).Value > 1599 Then Cells(y, 1).EntireRow.Delete Shift:=xlUp
Dim x As Long
For x = Range("AT1:AT" & Range("AT" & Rows.Count).End(xlUp).Row).Rows.Count To 2 Step -1
If LCase(Trim(Cells(x, 46).Text)) <> "submitted" Then Cells(x, 2).EntireRow.Delete Shift:=xlUp
Dim p As Long
For p = Range("u1:u" & Range("u" & Rows.Count).End(xlUp).Row).Rows.Count To 2 Step -1
If LCase(Trim(Cells(p, 21).Value)) > 1 / 1 / 1990 Then Cells(p, 2).EntireRow.Delete Shift:=xlUp
Next p
End Sub
Sub expended()y
Sub Over_expended()
'INSERT COLUMN J
'ALL TOTALS AT END
' Del_top_three_rows Macro
'
Rows("1:3").Select
Selection.Delete Shift:=xlUp
'Deletes all Rows that <> "5"
'If Cells(y, 12).Value < 1500 Or Cells(y, 12).Value > 1599 Then Cells(y, 1).EntireRow.Delete Shift:=xlUp
Dim x As Long
For x = Range("AT1:AT" & Range("AT" & Rows.Count).End(xlUp).Row).Rows.Count To 2 Step -1
If LCase(Trim(Cells(x, 46).Text)) <> "submitted" Then Cells(x, 2).EntireRow.Delete Shift:=xlUp
Dim p As Long
For p = Range("u1:u" & Range("u" & Rows.Count).End(xlUp).Row).Rows.Count To 2 Step -1
If LCase(Trim(Cells(p, 21).Value)) > 1 / 1 / 1990 Then Cells(p, 2).EntireRow.Delete Shift:=xlUp
Next p
End Sub