Learn Excel Episode 593: Unprotect Green Cells

Posted in Companies, Podcasts on July 11, 2008


Learn Excel Episode 593: Unprotect Green Cells

Today, the questioner asks how to unprotect the green cells. There isn’t any good way to do this in the Excel user interface, so in Episode 593, I use a tiny bit of VBA code to achieve the effect.

The code used in the podcast is:

Sub UnProtectGreen
For each Cell in Selection
If Cell.Interior.ColorIndex = 4
then Cell.Locked = False
Else Cell.Locked = True
End If
Next Cell
End Sub

Watch Video Watch Video on External Site

Tags: Microsoft, Excel, MrExcel