title: Vba to copy data with name of header from ws1 to ws2
body: <p>I use this code to copy data from ws1 to other ws base of columns header. I need to find lot of columns header, in this code i repeat code for each col header data. what I need a code where i enter all header name &amp; columns range (for paste) in one line to find and paste match complete columns in other ws.</p>
  
  <pre><code>Sheets.add After:=Sheets(Sheets.count)
  ActiveSheet.Name = "Filter Data"
  Sheets("RawData").Activate
  With Sheets("RawData").Rows(1)
  'Find "Name,Date,Num,Item,Qty,Sales Price,Amount &amp; etc" in Row 1
      Set na = .Find("Name", lookat:=xlPart)
      Set da = .Find("Date", lookat:=xlPart)
      Set nu = .Find("Num", lookat:=xlPart)
      Set it = .Find("Item", lookat:=xlPart)
      Set qt = .Find("Qty", lookat:=xlPart)
      Set sp = .Find("Sales Price", lookat:=xlPart)
      Set am = .Find("Amount", lookat:=xlPart)
      'If found, copy the column to Sheet (Filter Data)
          Columns(na.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("A1")
          Columns(da.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("B1")
          Columns(nu.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("C1")
          Columns(it.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("D1")
          Columns(qt.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("E1")
          Columns(sp.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("F1")
          Columns(am.Column).EntireColumn.Copy _
          Destination:=Sheets("Filter Data").Range("G1")
      'Else: MsgBox "Name Not Found"
  End With
  </code></pre>