title: how to copy the whole column to another column starting from a certain row
body: <p>I'm currently doing a macro to copy the whole column from one worksheet to another column starting from row 2 in another worksheet. However I don't think it's working, <code>Set des = Sheets(3).Range("P2:P" &amp; Rows(i))</code> this is the line causes error.</p>
  
  <pre><code>Sub Sample()
  Dim lastRow As Long, i As Long
  Dim CopyRange As Range
  Dim rw As Range
  Dim rw1 As Range
  Dim rw2 As Range
  Dim rw3 As Range
  Dim des As Range
  Dim des1 As Range
  Dim des2 As Range
  Dim des3 As Range
  '~~&gt; Change Sheet1 to relevant sheet name
  With Sheets(1)
      lastRow = .Range("A" &amp; .Rows.Count).End(xlUp).row
  
      For i = 2 To lastRow
          If Len(Trim(.Range("A" &amp; i).Value)) &lt;&gt; 0 Then
              If CopyRange Is Nothing Then
                  Set CopyRange = .Rows(i)
              Else
                  Set CopyRange = Union(CopyRange, .Rows(i))
                  Set rw = .Columns(16)
                  Set rw1 = .Columns(23)
                  Set rw2 = .Columns(3)
                  Set rw3 = .Columns(18)
              End If
          End If
      Next
  
      If Not CopyRange Is Nothing Then
          Set des = Sheets(3).Range("P2:P" &amp; Rows(i))
          Set des1 = Sheets(3).Columns("R")
          Set des2 = Sheets(3).Columns("T")
          Set des3 = Sheets(3).Columns("U")
          '~~&gt; Change Sheet2 to relevant sheet name
          rw.Copy des
          rw1.Copy des1
          rw2.Copy des2
          rw3.Copy des3
  
          Application.CutCopyMode = False
      End If
  End With
  End Sub
  </code></pre>