title: how to delete rows using if statement
body: <p>I have a range of 3 columns in my spreadsheet that need to be deleted using if statement. </p>
  
  <p>Basically, if it shows a date in any of those columns, I should maintain them, if not delete. It is important to highlight that I can't delete rows that have a date in one column but don't have in another, if there is a date in any of them, I should maintain the rows. </p>
  
  <p>I tried to write the following code but I am having problems</p>
  
  <pre><code>Sub maintain_only_dates()
      Set Rng = Range("b1:D10000")
      If Rng = Format("ddmmyyyy") Then
          Cell.Interior.ColorIndex = 7
      Else
          Range("A:A").EntireRow.Delete
      End If
  End Sub
  </code></pre>
  
  <p>I would really appreciate your help. Thank you</p>