title: Excel VBA: Using FIND: How to select the cell where the item is found?
body: <p>I am using Excel VBA to search for a string e.g. "CCC" in an Excel worksheet.
  I used the simple code shown.</p>
  
  <p>However, I want VBA to select the cell where the first occurrence of "CCC" is found. (Just like when you do a FIND manually).</p>
  
  <p>How can I modify my code to achieve this?`</p>
  
  <hr>
  
  <pre><code>Private Sub CommandButton1_Click()
  
  Dim rng As Range
  Set rng = Cells.Find(What:="CCC", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
          xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
          , SearchFormat:=False)
  
  If Not rng Is Nothing Then
      MsgBox ("found")
  Else
      MsgBox ("not found")
  End If
  
  End Sub       
  </code></pre>