title: Iterate through cell values and conditional formatting
body: <p>I have 10 cells in a column that are % error values. If any of the values are less than -0.1 or greater than 0.1, and if a certain drop down box is selected as "No", then I need an adjacent column to be unlocked and able to be edited.  What I have done is named the entire column of cells (Perc_Error1), and used that to reference... I think that is where the problem is, excel isn't reading each cell value but rather the whole name value and it probably has no idea what it is..</p>
  
  <p>I want to iterate through each % error cell value, but I also need to read the dropdown value as well.. this doesn't seem to be working with the code I have</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  
   Dim i As Variant
  ActiveSheet.Unprotect Password:=TRPassword
      If Range("Annual_Verif").value = "Yes" Then
          Range("Ref_Test_Point").Locked = False
          Range("EGM_Target_Reading").Locked = True
          Range("EGM_Reading").Locked = False
          Range("Perc_Error2").Locked = True
          End If
  
  
      If (Range("Annual_Verif").value = "No") Then Resume Next
          For Each i In Range("Perc_Error1").Cells
              If (Abs(i.value) &gt; (0.1)) Then
                  Range("Ref_Test_Point").Locked = False
                  Range("EGM_Target_Reading").Locked = True
                  Range("EGM_Reading").Locked = False
                  Range("Perc_Error2").Locked = True
              End If
          Next
          ActiveSheet.Protect Password:=TRPassword
  End Sub
  </code></pre>
  
  <p>Any help is appreciated...</p>