Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make headers for columns in which their are 6 columns? jobo Excel Worksheet Functions 3 January 16th 10 06:32 PM
How do I slant the headers of the columns? Filly Excel Worksheet Functions 2 April 15th 08 06:41 PM
Line up headers and columns Georgea Excel Discussion (Misc queries) 0 January 6th 08 07:00 PM
Clear columns or Drap Columns Display 007[_2_] Excel Programming 0 July 22nd 06 06:40 PM
copy over just columns and headers lbierer Setting up and Configuration of Excel 1 July 14th 06 08:52 PM


All times are GMT +1. The time now is 10:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"