title: Excel Macro, Copy Cell to a location if a cell has a value
body: <p>I am looking for some help with excel Macros eg. If a value is found in Desc that matches Bill/car/rent/tax the Cost value copied to the correct column.</p>
  
  <pre>
  Cost    Desc        Bill    Car Rent    Tax
  
  155     Bill                    
  165     Rent                    
  195     tax                 
  </pre>
  
  <pre>
  Cost    Desc        Bill  Car   Rent    Tax
  
  155     Bill        155         
  165     Rent              165       
  195     tax                     195
  </pre>
  
  <p>Can this be done? 
  Thanks in advance. I have attempted and can select the value but not sure how to paste it etc, not very good with vba macros.</p>
  
  <p>Thanks for the replies. sorry I am still confused just learning stuff atm. this is what I got maybe its not the correct way to go about doing it.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Sub Test()
  For Each Cell In Sheets(1).Range("B:B")
      If Cell.Value = "Bill" Then
          matchRow = Cell.Row
          Rows(matchRow - 1).Select
          Selection.Copy
  
         
      End If
  Next
  End Sub</code></pre>
  </div>
  </div>
  </p>