title: VBA loop through all the values in a column
body: <p>I am self learning VBA and stumbling upon obstacles. Here's one -</p>
  
  <p>I need to loop through an entire column (or till whatever is the last value in that column which will be not known) of a workbook B and the code I am writing in workbook A. I searched through net and got a code which does similar thing </p>
  
  <pre><code> http://www.ozgrid.com/forum/showthread.php?t=110928
  </code></pre>
  
  <p>code snippet posted by rbrhodes is as follows -</p>
  
  <pre><code> ' Loop on each value (cell)
    For Each Cel In LookRange 
       ' Get value to find
      CelValue = Cel.Value 
       ' Look on sheet2
      With Sheet2 
  </code></pre>
  
  <p>But my problem is that I need to split the value in column X of Workbook A in two based on a delimiter and then browse through the entire column Y of Workbook B. Afterwards concatenate the looked upon word (from workbook B) and then check that against column X1 in Workbook A. I thought of using </p>
  
  <pre><code>Split(CelValue, "_")
  </code></pre>
  
  <p>But I'm getting error as Type mismatched as CelValue is Variant and </p>
  
  <pre><code>CelValStr = CStr(CelValue)
  </code></pre>
  
  <p>isn't working!
  Can anyone please help me with this seemingly silly question for all the experts out there?</p>
  
  <p>Thank you!</p>