How to clear content from unprotected Field

A

Amean1

Is there any way to clear unprotected content from the sheet that also
contains formulas in protected fields quickly rather than going column
by column and delete unprotected data?

Thanks for any help that you can provide..
 
G

Gord Dibben

One way is with a macro.

Sub UnlockedCells()
Dim wk As Worksheet
Dim cl As Range
For Each cl In wk.UsedRange
If cl.Locked = False Then
cl.ClearContents
End If
Next
Next
End Sub

This assumes that you have sheet protection set with option "select unlocked
cells" checked.


Gord Dibben MS Excel MVP
 
Top