cell shading
Sub clearum()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Interior.ColorIndex = 6 Then
cell.ClearContents
End If
Next
End Sub
The 6 is for yellow. Adapt as you like.
--
Gary''s Student - gsnu200806
"dunny_budgie" wrote:
Is there a way to automatically reset the value of all cells in a spreasheet
that have been shaded a specific colour?
In my spreadsheet I have (for ease of use) shaded yellow all the cells that
the user can input data into. Anything not shaded yellow is protected and
unavailable to the user. What i want to do is clear all the user inputs at
the end of each month, so that at the start of the following month they can
re-use the spreadsheet.
Can this be done? i could not find anything in VBA, but there must be
something.
Any help is appreciated!
|