Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Multiple text in range into single column

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Multiple text in range into single column

Are all the names in different cells?

RBS


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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Multiple text in range into single column

Yes, each name is in a separate cell.

"RB Smissaert" wrote:

Are all the names in different cells?

RBS


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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Multiple text in range into single column

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?


"NigelVII" wrote:

Yes, each name is in a separate cell.

"RB Smissaert" wrote:

Are all the names in different cells?

RBS


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting Text from single cell in column across multiple Columns Harold Excel Worksheet Functions 3 March 14th 10 11:06 AM
Display text from a single cell in a column range brettopp Excel Discussion (Misc queries) 2 July 18th 08 11:47 PM
import multiple text files into single sheet separate column Jootje Excel Programming 10 February 8th 08 05:09 PM
how do I easily convert a single column of text (multiple rows si. philmah Excel Discussion (Misc queries) 2 December 16th 04 12:24 AM
Converting CSV text in a single column, into multiple columns Kerry M. Soileau Excel Programming 1 October 4th 03 09:22 AM


All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"