title: Type mismatch error instr
body: <p>I want to find the IC number in the policyowner(NRIC). But there is error in the code.</p>
  
  <pre><code>    Dim col As Long
      Dim IC, NRIC
      Dim name
  
      name = ActiveSheet.Cells(rw, 1).Value
  
      NRIC = ThisWorkbook.Sheets("main").Columns(9)
  
      IC = InStr(1, name, "(" &amp; NRIC &amp; ")") &lt;&lt;&lt;&lt;&lt; this is the problem (type mismatch error)
  
      MsgBox IC
  </code></pre>
  
  <p>The display:</p>
  
  <p><strong>main sheet</strong></p>
  
  <p>name column</p>
  
  <ul>
  <li>sherry </li>
  </ul>
  
  <p>IC column </p>
  
  <ul>
  <li>S1233456c</li>
  </ul>
  
  <p><strong>policydetails Sheet</strong></p>
  
  <p>policyowner(NRIC) column</p>
  
  <ul>
  <li>sherry(S1233456c) </li>
  </ul>