Multiple text in range into single column

N

NigelVII

I have data in rows like this:

Sally Bob Dave Wally
Jim Dave Henry Frank Ralph John Ringo George Paul
Henry Bob

There can be as many as 25 names and the number of rows will increase.

I am trying to get all the names in a separate column and remove duplicates.

I would gratefully appreciate help with this?
 
N

NigelVII

I did get this to work:

Sub NamedRangeToSeparateCells()
Dim nString As String
Dim nRange As Range
Dim nCells As Integer

nCells = 0

For Each nRange In Range("IND_NAMES_ARRAY")

If nRange.Value <> Empty Then
nCells = nCells + 1
nString = nString & nRange.Value
Cells(nCells, 30).Value = nString
Else
End If

nString = " "

Next
End Sub

As a guy who just slaps code together and sometimes it works, I'm just
curious if this is good, compact code?
 

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

Top