title: Move cells with pattern search and copy
body: <p>I would like to achieve following in VBA </p>
  
  <pre><code>Input Workbook1 
  Index   Value 
   1       a
   2       a
   3       b
   4       c
   5       a
   6       b
   7       a
   8       c
  </code></pre>
  
  <p>Output Workbook2 </p>
  
  <p>I would like to have output in following format so that I can generate graph with same X axis </p>
  
  <pre><code>Index   Value 1 Value 2     Value 3
  1        a      
  2        a      
  3                b  
  4                             c 
  5        a      
  6                b  
  7        a      
  8                             c
  </code></pre>
  
  <p>I am using two functions, the first one to move two columns from workbook 1 to workbook2 </p>
  
  <pre><code>Sub MOVE() 
      Sheets("Workbook1").Columns("A").Copy Sheets("Sheet1").Range("A1")
      Sheets("Workbook1").Columns("B").Copy Sheets("Sheet1").Range("B1")`
  end sub
  </code></pre>
  
  <p>2nd function is:</p>
  
  <pre><code>Sub move_a() 
      Worksheets("Sheet1").Activate 
      Dim myR As Range 
      Set myR = Range("B:B").Find("PATTERN_A") 
      Do While Not myR Is Nothing
           myR.Insert xlToRight 
          Set myR = Range("B:B").FindNext 
      Loop
  end sub
  </code></pre>
  
  <p>but 2nd one is not working</p>