List Range

  • Thread starter Thread starter ianripping
  • Start date Start date
I

ianripping

I have a list of names. The names have blanks in between them.

I want to put these names into a list with no gaps.

Any Idea's?

The list needs to be one cell after the other
 
Hi

personally i would just sort the list - this will put all your gaps at the
bottom

Cheers
Julie
 
Sub ManageList()
Selection.Copy Destination:=Selection.Offset(0, 1)
Selection.Offset(0, 1).SpecialCells(xlBlanks).Delete Shift:=xlShiftUp
End Sub
 
Sub DeleteCell()
Range("A:A").SpecialCells(xlCellTypeBlanks).Delete
End Sub

Or if you have more than one column of names
just highlight the range and:

Sub DeletCellsInRange()
Dim MyCells As Range
For Each MyCells In Selection.Areas
With MyCells
.SpecialCells(xlCellTypeBlanks).Delete
End With
Next MyCells
End Sub

Mike Q.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top