title: Excel Data Validation -Disable cell in excel based on drop down value
body: <p>I have 2 columns in an Excel sheet. <code>A1</code> contains a drop down with the values "Enable" and "Disable". Cell B1 and C1 needs to be enabled or disabled based on the <code>A1</code> drop down selection.</p>
  
  <p>I tried using Data Validation but it does not work. Can anyone suggest how I might use Data Validation to accomplish this?</p>
  
  <pre><code>          A     |   B
  ------------------------
  1       Suggestions| (This cell should disable (B1))
  ------------------------
  2       Errors| (Now here drop down will come with values(B2))
  ------------------------
  </code></pre>
  
  <p>Current VBA</p>
  
  <pre><code>  Private Sub Worksheet_Change(ByVal Target As Range)
       ThisRow = Target.Row
        If Target = Range("A1") Then
             If Target.Value = "Suggestions" Then
                  Worksheets("Code Review").Range("B:C").Locked = True
              End If
        Else
           Worksheets("Code Review").Range("B:C").Locked = False
        End If 
       End Sub
  </code></pre>
  
  <p>Also tried like this</p>
  
  <pre><code>    Private Sub Worksheet_Change(ByVal Target As Range)
      Dim cel As Range
      If Not Intersect(Range("A:A"), Target) Is Nothing Then
      Application.EnableEvents = False
      Me.Unprotect
      For Each cel In Intersect(Range("A:A"), Target)
          cel.Offset(ColumnOffset:=1).Resize(ColumnSize:=2).Locked = _
          cel.Value = "Suggestion"
      Next cel
      Me.Protect
      Application.EnableEvents = True
      End If
  </code></pre>
  
  <p>But this locks everything :( I want just 2 cells to be locked.</p>