title: Excel VBA find values in another column if it matches
body: <p>Generally, my problem is I want to find values in Column B if it Exists in Column D and do concatenate the first character in Column D to Column B.</p>
  
  <p>Here's my initial code:</p>
  
  <pre><code>Dim ix, ixLastrow as Long
  ixLastrow = ShtData.Range("B" &amp; Rows.Count).End(xlUp).Row
  
  For ix = 2 to ixLastrow
  If ShtData.Cells(ix, 2).value = ShtData.Cells(ix, 4) then
  ShtData.Cells(ix, 3).Value = ShtData.Cells(ix,2) &amp; Left(ShtData.Cells(ix, 4), 2)
  End if
  Next ix
  </code></pre>
  
  <p>The code works if the value is Align to the ROW and Exact same value, but what I want to do is the Find String value is in column B then search for Matches in Column D.</p>
  
  <p>For Better understanding what I want to do here. See sample Data below.</p>
  
  <pre><code>Column B     |     Column D
  AAA          |     IH (for AAF only)
  AAB          |     ID (for AAD only)
  AAC          |
  AAD          |     IA (for AAA and AAB only)
  AAE          |
  AAF          |
  </code></pre>
  
  <p>As you could see, my goal would be something like this</p>
  
  <pre><code>Column C
  AAA IA
  AAB IA
  AAC
  AAD ID
  AAE
  AAF IH
  </code></pre>
  
  <p>As far as I know, my code can't give me this output. Im still new to Excel VBA, I would be really glad If someone would help me with this.
  Thanks :)</p>