View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Clear some columns but not all columns and keep headers in all columns

Hi Howard,

Am Tue, 4 Jul 2017 21:02:25 -0700 (PDT) schrieb L. Howard:

I was able to make it work with this.
Thanks for help getting me there.


sorry that I misunderstood your problem.

Try:

Sub ClearCols()
Dim LRow As Long
Dim i As Integer

With Sheets("Sheet3")
LRow = .UsedRange.Rows.Count
For i = 3 To 15 Step 3
.Range(.Cells(2, i), .Cells(LRow, i)).ClearContents
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016