Thread
:
Combining Contents of cells into one cell
View Single Post
#
4
Posted to microsoft.public.excel.worksheet.functions
ExcelChallenge
external usenet poster
Posts: 4
Combining Contents of cells into one cell
Thanks! That worked!
"Don Guillett" wrote:
Here is a macro using FINDNEXT. Look in vba help index for more info on
findnext.
Sub findnums()
lr = Cells(Rows.Count, "a").End(xlUp).Row
With Range("a1:a" & lr)
Set c = .Find(333, LookIn:=xlValues)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
ms = ms & " " & c.Offset(, 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < FirstAddress
End If
End With
MsgBox ms
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"ExcelChallenge" wrote in message
...
I have a spreadsheet with one column (let's call it column 1) that has
numbers as identifers. In column 1, there may be several occurences of
the
same number. In the row for the number, there is another column that
contains text (let's call it column 2). Here's what I want to do. I want
to
combine all the text from each column 2 occurence related to the number in
column 1. So, if column 1 has a row with the number 333 and column 2 in
that
row has the text "Hello" and another row in column 1 also has number 333
but
the column 2 text is "What", I want to have output in one cell = Hello
What
with the column 1 cell on the same row showing 333. Is this possible?
Reply With Quote
ExcelChallenge
View Public Profile
Find all posts by ExcelChallenge