title: VBA copies Columns including all blank cells
body: <p>This VBA works. It makes a new worksheet, and then copies every and all cells in column(45) including the blank ones. How do I get it to not copy the blank/cells or the ones that contain no value? I know once the everything is consolidated into the new worksheet I can use the filter function for blanks but I want to skip that step.</p>
  
  <pre><code>Sub merge()
      Dim Sh As Worksheet, ShM As Worksheet, i&amp;, z&amp;
      Application.ScreenUpdating = 0
      Set Sh = Worksheets.Add(, Sheets(Sheets.Count))
      Sh.Name = "consolidated"
      For Each ShM In ThisWorkbook.Worksheets
          If ShM.Name &lt;&gt; Sh.Name Then
              i = ShM.Cells(Rows.Count, 45).End(xlUp).Row
              ShM.Activate: ShM.Range(Cells(1, 45), Cells(i, 45)).Copy
              Sh.Activate: Sh.Cells(z, 1).PasteSpecial xlPasteValues
          End If
      Next ShM
      Application.ScreenUpdating = 1
  End Sub
  </code></pre>