ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List Range (https://www.excelbanter.com/excel-programming/302145-list-range.html)

ianripping[_75_]

List Range
 
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

--
Message posted from http://www.ExcelForum.com


JulieD

List Range
 
Hi

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

Cheers
Julie

"ianripping " wrote in message
...
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.


---
Message posted from http://www.ExcelForum.com/




Tom Ogilvy

List Range
 
Sub ManageList()
Selection.Copy Destination:=Selection.Offset(0, 1)
Selection.Offset(0, 1).SpecialCells(xlBlanks).Delete Shift:=xlShiftUp
End Sub

--
Regards,
Tom Ogilvy




"ianripping " wrote in message
...
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.


---
Message posted from http://www.ExcelForum.com/




Mike Q.[_3_]

List Range
 
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.

-----Original Message-----
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.


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 08:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com