I'll try to keep this a straight forward as possible. I'd like take all the names in multiple row and add them together as one string, based on the status of an adjacent column.
A B
bill yes
joe yes
kim no
mary yes
To get: "bill, joe, mary"
I can get the string made, but cant quite get the "based-on" part ...
---------------------------------------------------
Sub GetSSM()
Dim i, LastRow, OneCell
LastRow = Range("B" & Rows.Count).End(xlUp).Row
Range("AA1").Value = ""
For i = 1 To LastRow
OneCell = OneCell & Cells(i, "B").Value & ", "
Next
Range("AA1").Value = Left(OneCell, Len(OneCell) - 1)
Range("AA1").Select
'Selection.Copy
------------------------------
Thanks in advance!!
TC
Bookmarks