title: Assigning Defined Name to a variable
body: <p>I have the following code and am banging my head against the wall why it does not work.
  When using the commented line with the range as $K10 it works fine when I assign a named range rngValidation it does not work. The defined name range of "ptrValidationCells" is set to $K10.</p>
  
  <pre><code>Sub FormatConditions_2()
  
      Dim rngToFormat As Range
      Dim rngValidation As Range
  
      Set rngToFormat = ActiveSheet.Range("inpInputCells")
      Set rngValidation = ActiveSheet.Range("ptrValidationCell")
  
  '    rngToFormat.FormatConditions.Add Type:=xlExpression, Formula1:="=$K10&lt;&gt;FALSE"
  
      rngToFormat.FormatConditions.Add Type:=xlExpression, Formula1:="=rngValidation &lt;&gt;FALSE"
  
          With rngToFormat.FormatConditions(2).Interior
              .PatternColorIndex = xlAutomatic
              .Color = RGB(255, 192, 0)
              .TintAndShade = 0
          End With
          With rngToFormat.FormatConditions(2).Font
              .Bold = True
              .Italic = False
              .Color = RGB(192, 0, 0)
              .TintAndShade = 0
          End With
  
  End Sub
  </code></pre>
  
  <p>Thanks for any assistance</p>