title: How to clear cells in Excel by macro
body: <p>I'm trying do a macro in excel that clear cells for A1:A100 but I have only find a macro that can do that to one cell. How can I make it work for more cells?</p>
  
  <pre><code>Sub ClearCell()
  Dim Rng As Range
  Set Rng = ActiveSheet.Range("A1")
  
  Dim i As Long
  For i = 1 To 10
      If Rng.Cells(i,1) = "" Then
         Rng.Cells(i,1).ClearContents
      End If
  Next i
  End Sub
  </code></pre>