Empty cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I got a spreadsheet that in sheet1 have a list of names in a range (for
example, A31:A1000) and some of the cells are in blanks. I need to copy the
list of names to sheet2 without the empty cells. How can I do that?
 
Assume the names are constants and not produced by formula

with Worksheets("Sheet1")
.Range("A31:A1000").SpecialCells(xlconstants, _
xlTextValues).copy worksheets("sheet2").range("A1")
End With
 
Back
Top