title: Merging CSVs into one sheet and removing headers
body: <p>I merge all CSV files in a folder into one Excel sheet.</p>
  <pre class="lang-vb prettyprint-override"><code>Sub MergeFiles_Click()
  
      Dim strSourcePath As String
      Dim strDestPath As String
      Dim strFile As String
      Dim strData As String
      Dim x As Variant
      Dim Cnt As Long
      Dim r As Long
      Dim c As Long
      
      Application.ScreenUpdating = False
      
      strSourcePath = Sheet1.Range(&quot;G2&quot;).Value
      
      If Right(strSourcePath, 1) &lt;&gt; &quot;\&quot; Then strSourcePath = strSourcePath &amp; &quot;\&quot;
      
      strFile = Dir(strSourcePath &amp; &quot;*.csv&quot;)
      
      Do While Len(strFile) &gt; 0
          
          Cnt = Cnt + 1
          
          If Cnt = 1 Then
              r = 6
          Else
              r = Cells(Rows.Count, &quot;A&quot;).End(xlUp).Row + 1
          End If
          
          Open strSourcePath &amp; strFile For Input As #1
          Do Until EOF(1)
              Line Input #1, strData
              x = Split(strData, &quot;,&quot;)
              For c = 0 To UBound(x)
                  Cells(r, c + 1).Value = Trim(x(c))
              Next c
              r = r + 1
          Loop
              
          Close #1
  
          strFile = Dir
      Loop
      
      Application.ScreenUpdating = True
      
      If Cnt = 0 Then _
          MsgBox &quot;No CSV files were found...&quot;, vbExclamation
  
  End Sub
  </code></pre>
  <p>This merges all of the CSV files into one sheet but each CSV file has a header and other info at the top that takes up 12 rows.</p>
  <p>I'd like to keep the 12 rows for the first CSV, but remove them from the remaining files prior being put in the Excel sheet.</p>
  <p>I want the files to appear as one rather than it look like the files were copied and pasted down the sheet.</p>