View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HUGO HUGO is offline
external usenet poster
 
Posts: 30
Default VBA to delete column values and formats NOT formulas

This is what I have:

Sub ClearColumns()
dtTemp = Range("C1")
lngLastCol = Cells(1, Columns.Count).End(xlToLeft).Column
For lngcol = 4 To lngLastCol
If CDate(Cells(1, lngcol)) dtTemp Then _
Columns(lngcol).ClearContents
Next
End Sub

How do I make this so it only deletes cell values and formatting?
--
Hugo