title: Finding matching values using excel vba
body: <p>Without using excel built-in filter or pivot table function, I want to extract some results using vba. Consider the following example: given data in coloumn A and B, I want to be able to input &quot;a&quot; in C1 and using the vba to get in Column D all the corresponding values from column B (1,3,5). If I input &quot;b&quot;, I get 2, 6, so on. Thanks.  <img src="https://i.stack.imgur.com/QA4CY.png" alt="enter image description here" />
  <img src="https://i.stack.imgur.com/5JW1u.png" alt="enter image description here" /></p>