Hello,

I'm quite a novice here. I'm trying to delete rows where column C contains specific text in some instances. In other cases I am trying to delete rows where specific text is found in column C AND column M contains the year 2009 (in format dd-mm-yyyy).

The code I'm working with so far is as follows:

'This part is working OK
Sub DataProcess()

DataSheetProcess Macro

Sheets("Data").Select

LastRow = Cells(Rows.Count, 1).End(xlUp).Row

'start incrementing
For y = LastRow To 2 Step -1

'If Cells(y, "C").Value = "SANS" Then Rows(y).EntireRow.Delete
'End If

'If Cells(y, "C").Value = "NOVA" Then Rows(y).EntireRow.Delete '
'End If

'The following is not working correctly

If Cells(y, "C").Value = "DINERS MIGRATED MERCHANTS" AND EntryDate.Cells(y, "M").Value = 2009 Then
Rows(y).EntireRow.Delete
End If

Next y
End If

End Sub