Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating macros in excel
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
EXCEL 2007 CREATING A MACROS | New Users to Excel | |||
Creating Macros to connect 2 different excel sheet | Excel Discussion (Misc queries) | |||
creating macros in excel | Excel Discussion (Misc queries) | |||
creating excel macros | Excel Worksheet Functions | |||
Creating Global excel macros | Excel Programming |