View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Identify unprotected cells in protected sheet and clear their cont

Sub test()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If Not cell.Locked Then cell.ClearContents
Next cell
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"NezRhodes" wrote in message
...
Hello Gurus

I would like to create some script that dynamically identifies unprotected
cells in a worksheet and clears their contents

Thanks in advance!