title: VBA to dynamically filter an excel column
body: <p>I am trying to write a macro to for a rule.</p>
  
  <pre><code>A   B   C   D   E
  
  X   1   RT  YY  SOW  
  D   3   FT  GH  TOW  
  F   4   FG  TY  
  </code></pre>
  
  <p>Rule: Filter on column E one by one and copy the value in column A and C. The value in column E is not predetermined. So I can have an excel with different values in column E and hence I cannot hardcode my filter criteria. </p>
  
  <p>I want to filter on first value (sow in example) then whatever rows I get, I copy column E value in column A and C for those rows. Then I filter on second value (tow in example) and copy it in column A and C.</p>
  
  <p>The result should look like this</p>
  
  <pre><code>A     B    C   D   E
  
  SOW   1   SOW  YY  SOW  
  TOW   3   TOW  GH  TOW  
  F     4   FG   TY  
  </code></pre>
  
  <p>Note: Now of course there will be hundreds of rows and just not one row. and hence the need for a macro.</p>
  
  <p><strong>Clarification</strong> : I want to take everything but blanks, from column E and copy into respective rows in column A and C. But since column E does not have strict defined values, I am not able to hard code my filter criteria. Column E may have different number of unique values and combination. And I would like to take the values as is without the blanks and copy into columns A and C.</p>