title: Search and Update Values in a row with a userform
body: <p>I have created a userform for data entry. I am now looking to expand this to look into data that has already been entered, where some data may be missing, and updating the values within that row.</p>
  
  <p>The search criteria is a reference number, which is in the table in column A. The code however is returning the msg that ID is not found. </p>
  
  <pre><code>Dim searchRange As Range
  Dim foundCell As Range
  Dim mysearch As String
  
  mysearch = Me.Reference.Value
  
  Set searchRange = ThisWorkbook.Sheets("Master Data").Range("A2").End(xlDown)
  Set foundCell = searchRange.Find(what:=mysearch, after:=searchRange.Cells(searchRange.Cells.Count))
  
  If Not foundCell Is Nothing Then
      If foundCell.Offset(0, 1).Value = Me.Reference.Value Then
         foundCell.Offset(0, 8).Value = Me.Merchant.Value
      Else
          MsgBox "Name does not exist."
      End If
  Else
      MsgBox "ID does not exist."
  End If
  </code></pre>