I used a vlookup formula to control the content of E9 (MERGED AREA). If g12 (MERGED AREA) needs to be unlocked, the content of E9 will be "WF". All I need then is a code to unlock g12 if content of E9 is "WF". I would like it to clear g12 if the content of E9 is changed to something else other than "WF"

Here is the code that I tried but nothing seems to happen.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Not Intersect(Target, Range("E9").MergeArea) Is Nothing Then
       Select Case Target.Cells(1, 1).Value
         Case "WF"
           ActiveSheet.Unprotect PW
             Application.EnableEvents = False
               Range("G12").Cells(1, 1) = Target.Cells(1, 1)
               Range("G12").MergeArea.unLocked = True
             Application.EnableEvents = True
           ActiveSheet.Protect PW
       End Select
    End If
     
End Sub