View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default creating macros in excel

Maybe something like:

Option Explicit
Sub testme()

Dim iRow As Long
Dim FirstRow As Long
Dim LastRow As Long
With Worksheets("sheet1")
FirstRow = 2
LastRow = .Cells(.Rows.Count, "C").End(xlUp).Row
For iRow = 2 To LastRow Step 2
.Cells(iRow, "C").ClearContents
Next iRow
End With

End Sub

Did delete mean clearcontents?

LisaVan wrote:

I need help creating macros in excel. What I am trying to do is create a
loop (I think) to do the same thing in a column, say every 2 cells. For
example, I would like to take column C, and delete the contents in every
other cell. (delete C2, C4, C6, etc. for the entire column).
Any suggestions would be MOST helpful.
Thanks.
Lisa


--

Dave Peterson