title: How to get row based on multiple criteria?
body: <p>I'm trying to search a worksheet for a row where the values in the first 3 columns match a set of 3 criteria.  I'm using this linear search:</p>
  
  <pre><code>Function findRow(pName as string,fNo as string,mType as string) As Long
  
  Dim rowCtr As Long
  
  rowCtr = 2
  While Not rowMatchesCriteria(rowCtr, pName,fNo,mType)
      rowCtr = rowCtr + 1
  Wend
  findRow=rowCtr
  
  End Function
  
  
  
  Function rowMatchesCriteria(row As Long, pName As String, fNo As String, mType As String) As Boolean
  
  rowMatchesCriteria = dSheet.Cells(row,1)=pName _
                          And dSheet.Cells(row,2)=fNo _
                          And dSheet.Cells(row,3)=mType
  
  End Function
  </code></pre>
  
  <p>We can assume that for any 3 criteria, there is only one match.  However, this is very slow.  <code>dSheet</code> has ~35,000 entries to search through, and I need to perform ~400,000 searches.</p>
  
  <p>I looked at some of the solutions in <a href="https://stackoverflow.com/questions/20764851/vba-excel-find-based-on-multiple-search-criteria-without-looping">this question</a>, and while I'm sure that using AutoFilter or an advanced would be faster than a linear search, I don't understand how to get the index of the row that the filter returns.  What I'm looking for would be:</p>
  
  <pre><code>Sub makeUpdate(c1 as string,c2 as string,c3 as string)
  
  Dim result as long
  
  result = findRow(c1,c2,c3)
  
  dSheet.Cells(result,updateColumn) = someUpdateValue
  
  End Sub
  </code></pre>
  
  <p>How do I actually return the <code>result</code> row that I'm looking for once I've applied AutoFilter?</p>