Macro to count duplicates and add relevant data to rows

How to summarize duplicate rows for PARTNO from the table below to represent Quantity, PartNo and Reference designators in Excel like shown more below. Can you please let me know any macro , that I can use for? Right now I am using a pivot table and I am able to have PartNo and Quantity but unable to have all this reference designators in each row like shown below. This should work for complete Excel file which has many lines over…

+-----------+--------+
| PARTNO    | REFDES |
+-----------+--------+
| 59143232  | PL6890 |
| 34115851A | R1065  |
| 34115851A | R1408  |
| 34115851A | R2282  |
| 34115851A | R7712  |
| 34115851A | R7803  |
| 34115851A | R7804  |
| 34115851A | R9030  |
| 34115851A | R9031  |
| 34115851A | R9032  |
| 34115851A | R9033  |
| 34115851A | R9034  |
| 34115851A | R9035  |
| 34115868A | R7208  |
| 34115868A | R7210  |
+-----------+--------+

Expecting like this…

  • Java POI the supplied data appears to be in the Office 2007+ XML
  • Use VBA Macro to Save each Excel Worksheet as Separate Workbook
  • Cannot open Excel.Application workbook
  • Returning an index value from a group of ActiveX Option Buttons
  • Check if value in Sheet A is in Sheet B, return true, or false to respective row
  • Download attachment from Outlook and Open in Excel
  • +-----+-----------+-----------------------------------------------+
    | QTY | PARTNO    | REFDES                                        |
    +-----+-----------+-----------------------------------------------+
    | 1   | 34115851A | R1065                                         |
    | 12  | 34115851A | R1065,R1408,R2282,R7712,R7803,R7804,R9030.... |
    | 2   | 34115868A | R7208,R7210                                   |
    +-----+-----------+-----------------------------------------------+
    

    enter image description here sample file that i was looking to look like after running macro….

  • Excel VBA: Why doesn't any subsequent series get added on?
  • first blank row in excel
  • Excel macro - write data from formula into cells when pushing button
  • How can I reset a dynamically changing validation list to the first item?
  • Restrict access to excel file opened by C# program
  • How to import data from one sheet to another
  • MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.