View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Coleman John Coleman is offline
external usenet poster
 
Posts: 274
Default Clearing all values in range that aren't formulas


Sub ClearNonFormulas()
Dim cl As Range, myRange As Range
Set myRange = Range("myRange")
For Each cl In myRange.Cells
If cl.HasFormula = False Then cl.ClearContents
Next cl
End Sub

HTH
-John Coleman

Barb Reinhardt wrote:
I have a range called myRange and I'd like to clear out all values that
aren't formulas. How would I do this programmatically?

Thanks