Get data in different row and summarize in a single cell with comma

kelvin0403

Board Regular
Joined
Jul 25, 2011
Messages
51
Hi everyone,

I would like to have a formula to summarize up all the customer name in a single cell which the shipment date falls into the same date.
Table 2 is the result that I wish to get. There is a comma "," in between each customer name.

Kindly advise how should I set the formula. Pls help. Thank you

Table 1
SHIPMENT DATECUSTOMERPRODUCTSQuantityInvoice No
01-07-2020B H Polymers1T60ZT-PFM20050038
01-07-2020Blend Colours Pvt Ltd2T300ZT-PFM20050052
01-07-2020Blend Colours (Telangana)2T150ZT-PFM20050058
02-07-2020Blend Colours Kattedan1T52ZT-PFM20060073
02-07-2020Blend Colours Burgul2TS156ZT-PFM20060073
03-07-2020Dolphin Polyfill2T50ZT-PFM20060020
04-07-2020Jai Corp2T156ZT-PFM20060007
04-07-2020Pr Polymer2T150ZT-PFM20060082
05-07-2020Ras Polytex2T100ZT-PFM20020155
05-07-2020Jai Corp2T250ZT-PFM20060089
05-07-2020B H Polymers1T260ZT-PFM20060052
05-07-2020Blend Colours Pvt Ltd2TS390ZT-PFM20060038

Table 2
DateCustomer
01-07-2020B H Polymers, Blend Colours Pvt Ltd, Blend Colours (Telangana)
02-07-2020​
Blend Colours Kattedan, Blend Colours Burgul
03-07-2020​
Dolphin Polyfill
04-07-2020​
Jai Corp, Pr Polymer
05-07-2020​
Ras Polytex, Jai Corp, B H Polymers, Blend Colours Pvt Ltd

Kelvin
 

Attachments

  • 1602339567517.png
    1602339567517.png
    53.4 KB · Views: 9

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Follow this tutorial


Book6.xlsm
ABCDEF
1SHIPMENT DATECUSTOMERPRODUCTSQuantityInvoice No
21/7/2020B H Polymers1T60ZT-PFM20050038
31/7/2020Blend Colours Pvt Ltd2T300ZT-PFM20050052
41/7/2020Blend Colours (Telangana)2T150ZT-PFM20050058
52/7/2020Blend Colours Kattedan1T52ZT-PFM20060073
62/7/2020Blend Colours Burgul2TS156ZT-PFM20060073
73/7/2020Dolphin Polyfill2T50ZT-PFM20060020
84/7/2020Jai Corp2T156ZT-PFM20060007
94/7/2020Pr Polymer2T150ZT-PFM20060082
105/7/2020Ras Polytex2T100ZT-PFM20020155
115/7/2020Jai Corp2T250ZT-PFM20060089
125/7/2020B H Polymers1T260ZT-PFM20060052
135/7/2020Blend Colours Pvt Ltd2TS390ZT-PFM20060038
14
15SHIPMENT DATECustomerList
161/7/2020B H Polymers,Blend Colours Pvt Ltd,Blend Colours (Telangana)
172/7/2020Blend Colours Kattedan,Blend Colours Burgul
183/7/2020Dolphin Polyfill
194/7/2020Jai Corp,Pr Polymer
205/7/2020Ras Polytex,Jai Corp,B H Polymers,Blend Colours Pvt Ltd
21
Sheet3
 

Attachments

  • Capture3.JPG
    Capture3.JPG
    41.6 KB · Views: 10
Upvote 0
Possibly with Some VBA. Don't have time to do it now. Maybe someone else will come by before I have a chance.
 
Upvote 0
If you have a version of Excel that supports TEXTJOIN and FILTER worksheet functions you can use the formula below. Otherwise, I'd be inclined to write a UDF.
Book1.xlsm
ABCDE
1SHIPMENT DATECUSTOMERPRODUCTSQuantityInvoice No
21/7/2020B H Polymers1T60ZT-PFM20050038
31/7/2020Blend Colours Pvt Ltd2T300ZT-PFM20050052
41/7/2020Blend Colours (Telangana)2T150ZT-PFM20050058
52/7/2020Blend Colours Kattedan1T52ZT-PFM20060073
62/7/2020Blend Colours Burgul2TS156ZT-PFM20060073
73/7/2020Dolphin Polyfill2T50ZT-PFM20060020
84/7/2020Jai Corp2T156ZT-PFM20060007
94/7/2020Pr Polymer2T150ZT-PFM20060082
105/7/2020Ras Polytex2T100ZT-PFM20020155
115/7/2020Jai Corp2T250ZT-PFM20060089
125/7/2020B H Polymers1T260ZT-PFM20060052
135/7/2020Blend Colours Pvt Ltd2TS390ZT-PFM20060038
14
15
16DateCustomer
171/7/2020B H Polymers, Blend Colours Pvt Ltd, Blend Colours (Telangana)
182/7/2020Blend Colours Kattedan, Blend Colours Burgul
193/7/2020Dolphin Polyfill
204/7/2020Jai Corp, Pr Polymer
215/7/2020Ras Polytex, Jai Corp, B H Polymers, Blend Colours Pvt Ltd
Sheet7
Cell Formulas
RangeFormula
B17:B21B17=TEXTJOIN(", ",TRUE,FILTER(B2:B13,A2:A13=A17))
 
Upvote 0
VBA Code:
Option Explicit

Sub NonPT()
    Dim s1 As Worksheet, s3 As Worksheet
    Set s1 = Sheets("Sheet1")
    Set s3 = Sheets("Sheet3")
    'Change the sheet names to your tabs
    Dim i As Long, lr As Long, last As Long, j As Long
    lr = s3.Range("A" & Rows.Count).End(xlUp).Row

    s3.Range("A2:B2").Copy
    s1.Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
    For i = 3 To lr
        If s3.Range("A" & i) = s3.Range("A" & i - 1) Then
            last = s1.Range("A" & Rows.Count).End(xlUp).Row
            s1.Range("B" & last) = s1.Range("B" & last) & ", " & s3.Range("B" & i)
        Else: s3.Range("A" & i & ":B" & i).Copy
            s1.Range("A" & last + 1).PasteSpecial xlPasteValuesAndNumberFormats
        End If
    Next i
    MsgBox "complete"
End Sub

Book6.xlsm
AB
11/7/2020B H Polymers, Blend Colours Pvt Ltd, Blend Colours (Telangana)
22/7/2020Blend Colours Kattedan, Blend Colours Burgul
34/7/2020Jai Corp, Pr Polymer
45/7/2020Ras Polytex, Jai Corp, B H Polymers, Blend Colours Pvt Ltd
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,126
Members
453,021
Latest member
Justyna P

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