View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Delete cell contents

Sub rob()
For Each r In ActiveSheet.UsedRange
If r.Locked Then
Else
r.ClearContents
End If
Next
End Sub
--
Gary''s Student - gsnu200713


"Rob" wrote:

Could someone please provide some VBA code that will delete all cell
contents for all the unlocked cells in a sheet?

Rob