T
Todd
I am trying to create a macro that will empty my worksheet
of all its entered data. Leaving the formulas.
What I have come up with is below. It deletes and the
cells shift up. I don't want that. How do I get it to
not delete, just clear so my formulas. I want formatting
to stay and cells not to move so the formuals still work.
Thanks, Todd
Sub DeleteUnLocked()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each cell In Selection
If cell.Locked = False Then cell.ClearContents
Next cell
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
MsgBox "No more cells to check"
End Sub
of all its entered data. Leaving the formulas.
What I have come up with is below. It deletes and the
cells shift up. I don't want that. How do I get it to
not delete, just clear so my formulas. I want formatting
to stay and cells not to move so the formuals still work.
Thanks, Todd
Sub DeleteUnLocked()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each cell In Selection
If cell.Locked = False Then cell.ClearContents
Next cell
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
MsgBox "No more cells to check"
End Sub