title: String search with in the excel column values row wise
body: <p>I have an Excel sheet which has 200 columns. Now number of rows are 3500. So i have to search a string if it presents within any column for each row. Now to make the process fatser,I am looking for any alternate instead of Looping technique. Is there any such?</p>
  
  <pre><code>IntRow6 = 2
  DataCount = 0
  
  Do While objSheet6.Cells(IntRow6,1).Value &lt;&gt; ""
    For DataCount = 0 to UBound(VMHArray)
          IntClmn3 = 1        
          Do While 1 = 1
              If objSheet6.Cells(IntRow6,IntClmn3).Value = VMHArray(DataCount) Then
                  objSheet6.Cells(IntRow6,IntClmn3+2).Value=objSheet6.Cells(IntRow6,IntClmn3+5).Value
                  Exit Do
              End If
              IntClmn3 = IntClmn3 + 1
          Loop
      Next
      IntRow6 = IntRow6 + 1
  Loop
  </code></pre>
  
  <p>The above is taking to much time, thus i am looking for an equivalent VBScript code which can run more faster search.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>ParentColmnCount=ParentColmnCount-1
  IntRow6=2
  DataCount=0
  
  Do While objSheet6.Cells(IntRow6,1).Value &lt;&gt; ""
      For DataCount=0 to UBound(VMHArray)
          If objSheet6.Range(objSheet6.Cells(IntRow6,1),objSheet6.Cells(IntRow6,ParentColmnCo‌​unt)).Find(VMHArray(DataCount)) &lt;&gt; Nothing Then
              MsgBox("Hi")
          End If
      Next
      IntRow6=IntRow6+1
  Loop
  </code></pre>
  
  <p>I'm getting any error saying that, "Object variable not set" error at the Range line of the above code.</p>
  
  <p><em><strong>UPDATE</em></strong></p>
  
  <p>I have updated my code as per your suggestion,and modified the declaration of variables as below:</p>
  
  <p>Option Explicit</p>
  
  <p>Dim objExcel1,objWorkbook</p>
  
  <p>Dim strPathExcel1</p>
  
  <p>Dim objSheet6,objSheet3</p>
  
  <p>Dim IntRow6,IntRow3</p>
  
  <p>Dim IntClmn3</p>
  
  <p>Dim DataCount,ParentColmnCount</p>
  
  <p>Dim Falg</p>
  
  <p>Dim TaskCounter</p>
  
  <p>Dim r As Range
  Dim s As Variant</p>
  
  <p>But I am getting the error again: Expected end of statement" in the line "Dim r As Range"</p>