Sub ClearCells()
Dim c As Range, sh As Worksheet
Application.ScreenUpdating = False
For Each sh In Sheets
For Each c In sh.UsedRange
If Not c.Locked Then c.ClearContents
Next
Next
End Sub
Thank you.How about
VBA Code:Sub ClearCells() Dim c As Range, sh As Worksheet Application.ScreenUpdating = False For Each sh In Sheets For Each c In sh.UsedRange If Not c.Locked Then c.ClearContents Next Next End Sub
Sub hnswart()
Dim Ws As Worksheet
With Application.FindFormat
.Clear
.Locked = False
End With
For Each Ws In Worksheets
Ws.UsedRange.Replace "*", "", , , , , True, False
Next Ws
Application.FindFormat.Clear
End Sub
That worked perfectly. Thank you very muchSub hnswart() Dim Ws As Worksheet With Application.FindFormat .Clear .Locked = False End With For Each Ws In Worksheets Ws.UsedRange.Replace "*", "", , , , , True, False Next Ws Application.FindFormat.Clear End Sub
How aboutVBA Code:Sub hnswart() Dim Ws As Worksheet With Application.FindFormat .Clear .Locked = False End With For Each Ws In Worksheets Ws.UsedRange.Replace "*", "", , , , , True, False Next Ws Application.FindFormat.Clear End Sub