Diane
A few caveats first. (And use a copy of the file, not the actual one)
1) As written this will operate on ALL worksheets (you could put some code
in to exclude sheets if you need this). Remember ALL sheets include your
first sheet. (You can exclude this by changing the name in the code from
First Sheet to whatever it is and taking the single quote out at the start
of this line and the 3rd from bottom ('End If)
2) I have only written code to clear the cells of the 'common areas' (e.g.
on Rectangle3 you clear D14
15 but not in Rectangle4). If these areas are
not common your code becomes a little trickier as you deal with each unique
area.
3) I have presumed when you run this the sheets are protected without a
password.
Sub RunOverSheets()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
'If wks.Name <> "First Sheet" Then
With wks
.Unprotect
.Range("C20").ClearContents
.Range("B22
23").ClearContents
.Range("D26").ClearContents
.Range("D28
29").ClearContents
.Protect
End With
'End If
Next wks
End Sub
That will clear the common cells from every sheet in the workbook when run.
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
web:
www.nickhodge.co.uk
UK Excel User Conference In Cambridge
November 28th - December 1st 2007
Register Now @
http://www.exceluserconference.com/UKEUC.html