How to Concatenate Multiple Rows with Conditions?

SiddharthB

New Member
Joined
Jun 11, 2018
Messages
1
Code No.Sr. NoCustomerDescriptionListIF (code)IF (sr. no)sumTextjoin (Description)
1
1ABCsentencex1121
22EFHsentencex1122
3sentencex1012
43PQRsentencex1123
5sentencex1013
6sentencex1013
74SYZsentencex1124
x0004
85LMOsentencex1125

<tbody>
</tbody>

I need to concatenate (with a line break) the multiple rows (in description column) for each customer having a serial no. so that in the Textjoin colum, there is only one row for each customer and that row has all the sentences (with a line break) in the description column pertaining to each customer.

Is this possible? Help! Thank you
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi & welcome to the board.
How about
Code:
Sub ConcatDel()
   Dim Rng As Range
   
   For Each Rng In Range("C:C").SpecialCells(xlBlanks).Areas
      Rng.Offset(-1, 7).Resize(1, 1).Value = Join(Application.Transpose(Rng.Offset(-1, 1).Resize(Rng.Count + 1)), Chr(10))
   Next Rng
   Range("C:C").SpecialCells(xlBlanks).EntireRow.Delete
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,839
Messages
6,127,204
Members
449,368
Latest member
JayHo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top