Forum Discussion
VBA to Concatenate rows based on another cells value
- May 24, 2024
Hi all,
I found what I need that does what I need. It doesn't remove duplicates if the same person has multiple tasks but that's not a major thing.
Dim s As String Dim i As Integer For i=1 To 1000 Start: If Cells(i, 6) <> "" And Cells(i + 1, 6) = "" And Cells(i + 7, 7)<> "" Then s = Cells(i, 7).Value & CH(10) & Cells9I +1, 7).Value Cells(i,7) = s Cells(i + 6).EntirRow.Delete GoTo start End If Next
Now I one Row for the Job, and in one of the cell I have the name of each person assigned a task. Instead of being separated by a comma, I opted to have each name on a separate line break.
Thanks for everyone who gave me ideas and help.
Cheers
Hi all,
I found what I need that does what I need. It doesn't remove duplicates if the same person has multiple tasks but that's not a major thing.
Dim s As String
Dim i As Integer
For i=1 To 1000
Start:
If Cells(i, 6) <> "" And Cells(i + 1, 6) = "" And Cells(i + 7, 7)<> "" Then
s = Cells(i, 7).Value & CH(10) & Cells9I +1, 7).Value
Cells(i,7) = s
Cells(i + 6).EntirRow.Delete
GoTo start
End If
Next
Now I one Row for the Job, and in one of the cell I have the name of each person assigned a task. Instead of being separated by a comma, I opted to have each name on a separate line break.
Thanks for everyone who gave me ideas and help.
Cheers