title: VBA to filter value in two colums and to delete rows
body: <p>I'm working on a sub() to import a .csv that i receive monthly (it's my very first macro).
  The structure of the file is very easy: there are 5 columns and a variable number of rows.</p>
  
  <p>In columns A there are dates (dd/mm/yyyy), in B codes, in C names, in D and E statistics (numbers).
  In the first row I have created a row with titles.
  Here the code:</p>
  
  <pre><code>Sub ImportCSV()
  
      With ActiveSheet.QueryTables.Add(Connection:= _
          "TEXT;D:\File.csv", Destination:=Range("$A$1"))
          Application.ScreenUpdating = False
          .Name = "FileName"
          .FieldNames = True
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .PreserveFormatting = True
          .RefreshOnFileOpen = False
          .RefreshStyle = xlInsertDeleteCells
          .SavePassword = False
          .SaveData = True
          .AdjustColumnWidth = True
          .RefreshPeriod = 0
          .TextFilePromptOnRefresh = False
          .TextFilePlatform = 850
          .TextFileStartRow = 1
          .TextFileParseType = xlDelimited
          .TextFileTextQualifier = xlTextQualifierDoubleQuote
          .TextFileConsecutiveDelimiter = False
          .TextFileTabDelimiter = True
          .TextFileSemicolonDelimiter = True
          .TextFileCommaDelimiter = False
          .TextFileSpaceDelimiter = False
          .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1)
          .TextFileDecimalSeparator = "."
          .TextFileThousandsSeparator = ","
          .TextFileTrailingMinusNumbers = True
          .Refresh BackgroundQuery:=False
           Application.ScreenUpdating = True
      End With
  
      Range("A1").EntireRow.Insert
      Cells(1, 1) = "DATE"
      Cells(1, 2) = "CODE"
      Cells(1, 3) = "NAME"
      Cells(1, 4) = "STATS1"
      Cells(1, 5) = "STATS2"
      Rows("1:1").Select
      Selection.Font.Bold = True
      Selection.HorizontalAlignment = xlCenter
  
      Columns("D").NumberFormat = "#,##0.00"
      Columns("D").HorizontalAlignment = xlCenter
      Columns("E").NumberFormat = "#,##0.00"
      Columns("E").HorizontalAlignment = xlCenter
  
      Range("A1:E1").Select
      Selection.AutoFilter
      Cells.Select
      Cells.EntireColumn.AutoFit
  
      Range("C2").Select
      ActiveWindow.FreezePanes = True
  
  End Sub
  </code></pre>
  
  <p>Now, I would like to clean these sheet with a filter that:</p>
  
  <ul>
  <li>can select the last day of the previous month from column A (usually
  I receive the file during the firs days of the current month. In
  column A could be also dates of the current month so I can't select 
  the last day...alternatively, I was thinking about an inputbox) and
  then delete all the other dates; <strong>in this column I have dates repeated</strong></li>
  <li>then, the filter is on column C and should apply 3 different filter:
  
  <ol>
  <li>cells in column C <strong>with the word "x"</strong> and then delete these rows;</li>
  <li>cells in column C <strong>with the word "y"</strong> and then delete these rows;</li>
  <li>cells in column C <strong>without the word "z"</strong> and then delete these rows;</li>
  </ol></li>
  </ul>
  
  <p>Hope that everything is clear...</p>