title: Excel VBA - Search for string in worksheet
body: <p>I've got this Excel Workbook which I want to search for a specific string in Sheet1. If it finds it, enter a new value. But, the sheet is pretty huge, so I don't think it would be very efficient to loop through each cell. So, can I search through a range and find it that way?</p>
  
  <p>This is what I've got so far:</p>
  
  <pre><code>Dim rngSearchRange as range
  
      With ThisWorkbook.Sheets(1)
        Set rngSearchRange = .Range("A2:A" &amp; .Range("A" &amp; Rows.Count).End(xlUp).Row)
      End With
  </code></pre>
  
  <p>The string I'm looking for is the first value in an array of three values. So, how can I search this range for that specific string, find the position and then enter a new value?</p>
  
  <p>I was thinking something along this:</p>
  
  <pre><code>Dim rngFindRange as range
  Set rngFindRange = rngSearchRange.Find(var(0), LookIn:=xlValues, lookat:=xlWhole)
  </code></pre>
  
  <p>The var(0) is the value in the array I'm after. But this line doesn't really give me any results. Am I way off here?</p>