title: VBA Filter Table and Copy Subset of Resulting Columns to Clipboard
body: <p>I am trying to automatically copy a subset of rows and columns from a source table into the clipboard for use in other applications. I am creating the filter on the header of the table and filtering the rows correctly but do not know how to then select the subset of columns in the order I want. The source table is Columns A - L and I want to copy out Columns C, I, H and F in that order to the clipboard after applying the filter. Some code (minus the copy part) is included below. </p>
  
  <pre><code>Sub exportExample()
      Dim header As Range
      Dim srcCol As Range
  
      Set header = [A5:L5]
  
      header.AutoFilter
      header.AutoFilter 12, "Example", xlFilterValues
  
      'Copy out columns C, I, H and F of the resulting table in that order
  End Sub
  </code></pre>
  
  <p>I can figure out how to copy the columns but can't figure out how to get them in the order I want. Any help is greatly appreciated! Thanks! </p>