title: VBA Excel accessing index with named range
body: <p>Quick example in VBA Excel:</p>
  
  <p>I have defined two named ranges with the same dimensions: <code>MyNamedRangeA</code> and <code>MyNamedRangeB</code>.<br>
  These are column vectors.</p>
  
  <pre><code>Dim cell As Range
  For Each cell in .range(MyNamedRangeA)
     Call MyFunction(cell)
  Next cell
  </code></pre>
  
  <p>I want <code>MyFunction</code> to hide the row of <code>cell</code>if another cell with the same index in <code>MyNamedRangeB</code> has the string value <code>x</code></p>
  
  <pre><code>Sub MyFunction(cell As Range)
  index = GetIndex(cell)
  If .range(MyNamedRangeB)(index) = "x" Then
     cell.EntireRow.Hidden = True
  End If
  </code></pre>
  
  <p>I would like to get help with completing this program.</p>
  
  <p>Specifically, I need to find out a way to perform the "GetIndex" operation, i.e. to provide the row index of the cell</p>