title: Error by copy pasting ranged due to merged cells
body: <p>SOLVED, SEE CODE BELOW</p>
  
  <p>I'm working on a code for filtering data and pasting the filtered data to the "destination" sheet.
  In the "review" sheet there is a long list with data that can be subdivided in certain categories. In cell F9 off the coversheet I can select a category.
  After pressing a button the data in the "review" sheet needs to be filtered and the data that is left after filtering should be pasted in the "destination" sheet. the "destination" sheet is a blank new sheet.</p>
  
  <p>The filtering part works, however the copy paste part is giving some errors. Because the "review" sheet has some merged cells in it. I am able to paste the formatting and the columnwidths, but the values give an error due to merged cells. Is there some way to work around this??</p>
  
  <p>In addition to this, when pasting the formatting, this is pasted to the same number of rows as in the "review" sheet before filtering. I want the formatting to be applicable on only the numer of rows left after filtering.</p>
  
  <p>I hope someone can help me out.</p>
  
  <p>See my source code below:</p>
  
  <pre><code>Dim wksCVP As Worksheet
  Dim wksReview As Worksheet
  Dim wksNew As Worksheet
  
  Set wksReview = Worksheets("REVIEW")
  Set wksCVP = Worksheets("COVER PAGE")
  Set wksNew = ThisWorkbook.Worksheets.Add
  
  wksReview.Cells.Copy wksNew.Cells
  wksNew.Cells.UnMerge
  
  Dim LastRow As Long
  With wksNew
      LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
  End With
  
  Select Case wksCVP.Range("F9").Value
      Case "Instrumentation"
          kolom = "J"
      Case "Equipment"
          kolom = "K"
      Case "Design / Fabrication"
          kolom = "L"
      Case "Inspection &amp; Testing"
          kolom = "M"
      Case "General / Other"
          kolom = "N"
  End Select
  
  If wksCVP.Range("F9").Value &lt;&gt; "" Then
      For i = 5 To LastRow
          If wksNew.Range(kolom &amp; i).Value &lt;&gt; "X" Then
              wksNew.Rows(i).EntireRow.Hidden = True
          End If
      Next i
  End If
  
   wksNew.Activate
  ActiveSheet.Range("A5", "Z" &amp; LastRow + 1).SpecialCells(xlCellTypeVisible).Copy
  
  With Sheets("DESTINATION").Range("A1")
      .PasteSpecial Paste:=xlPasteAll
  End With
  
  wksNew.delete
  </code></pre>