title: How to copy specific columns using VBA
body: <p>Is there a way I can change the following code to only copy specific cells range or columsn:</p>
  
  <p>For example: I have data in all columns from A to Z. I want to copy data to another sheet but I only want to copy the data from Column A, D, H and J(A2, D2, H2, J2).</p>
  
  <pre><code>Option Explicit
  
  Private Sub Worksheet_Activate()
  Dim LR As Long
  
  Me.UsedRange.Offset(1).ClearContents                'clear existing data
  
  With Sheets("Raw - Incident Request Report")
      .AutoFilterMode = False                         'remove any prior filtering
      .Rows(1).AutoFilter                             'activate autofilter
      .Rows(1).AutoFilter 27, Criteria1:="Breached"   'filter column D for 80%+
      LR = .Range("D" &amp; .Rows.Count).End(xlUp).Row    'is any data visible?
      If LR &gt; 1 Then
          .Range("AC7:AC" &amp; LR).Copy Range("C3")      'copy any data visible to report
          .Range("D7:D" &amp; LR).Copy Range("D3")
          .Range("I7:I" &amp; LR).Copy Range("E3")
          .Range("K7:K" &amp; LR).Copy Range("F3")
          .Range("T7:T" &amp; LR).Copy Range("G3")
      Else
          Range("C3") = "No Data Found"               'if none, give that message
      End If
      .AutoFilterMode = False                         'turn off autofilter
  End With
  
  End Sub
  </code></pre>
  
  <hr>
  
  <p>FINAL CODE - EDITED:</p>
  
  <pre><code>Option Explicit
  
  Private Sub Worksheet_Activate()
  Dim LR As Long
  
  Me.UsedRange.Offset(17).ClearContents
  
  With Sheets("Raw - Incident Request Report")
      .AutoFilterMode = False
      LR = .Range("D" &amp; .Rows.Count).End(xlUp).Row
      .Range("D6:AH" &amp; LR).AutoFilter Field:=26, Criteria1:="&lt;&gt;"
  
      If LR &gt; 1 Then
          .Range("AC7:AC" &amp; LR).Copy
          Sheets("Tickets").Range("C17").PasteSpecial xlPasteValues
          .Range("D7:D" &amp; LR).Copy
          Sheets("Tickets").Range("D17").PasteSpecial xlPasteValues
          .Range("I7:I" &amp; LR).Copy
          Sheets("Tickets").Range("E17").PasteSpecial xlPasteValues
          .Range("K7:K" &amp; LR).Copy
          Sheets("Tickets").Range("F17").PasteSpecial xlPasteValues
          .Range("T7:T" &amp; LR).Copy
          Sheets("Tickets").Range("G17").PasteSpecial xlPasteValues
      Else
          Range("C17") = "No Data Found"
      End If
      .AutoFilterMode = False
  End With
  
  End Sub
  </code></pre>