Hi,
I like to delete a cell which has a date in it. The date could be anything and I thought maybe if I use a wildcard */02 it might work. The dates are formated as 9/18/02. At the moment I use the macro below but it only works with the text "Date ".
'Sub DelRowInCulumn_A()
Dim RowNum As Integer
Dim LastRow As Integer
With Worksheets("CopiedFromWord")
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
' Move cells to left if 'Date' is found
For RowNum = LastRow To 1 Step -1
If Range("B" & RowNum).Value = "Date " Or Range("B" & RowNum).Value = "*/02" Then
Cells(RowNum, 1).Select
Selection.Delete Shift:=xlToLeft
Cells(RowNum + 1, 1).Select
Selection.Delete Shift:=xlToLeft
End If
Next RowNum
Range("A1").Select
End With
'End Sub
Your help is very much appreciated
Andonny
I like to delete a cell which has a date in it. The date could be anything and I thought maybe if I use a wildcard */02 it might work. The dates are formated as 9/18/02. At the moment I use the macro below but it only works with the text "Date ".
'Sub DelRowInCulumn_A()
Dim RowNum As Integer
Dim LastRow As Integer
With Worksheets("CopiedFromWord")
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
' Move cells to left if 'Date' is found
For RowNum = LastRow To 1 Step -1
If Range("B" & RowNum).Value = "Date " Or Range("B" & RowNum).Value = "*/02" Then
Cells(RowNum, 1).Select
Selection.Delete Shift:=xlToLeft
Cells(RowNum + 1, 1).Select
Selection.Delete Shift:=xlToLeft
End If
Next RowNum
Range("A1").Select
End With
'End Sub
Your help is very much appreciated
Andonny