UPCs.jpg

I need to create a table based off of a pivot table's results. I need to move the data results from Vertical as shown below in the "Pivot Table Results" to Horizontal as shown below in the "Results Needed In A Second Table". Can this be done via a formula or macro? I have also attached an image that shows a snippet of the pivot table and to the right of that, an example of how I need the second table to appear.

PIVOT TABLE RESULTS:
1 20
2 32
2 50
6 10
25 33
25 40
25 52
25 65

RESULTS NEEDED IN A SECOND TABLE
1 20
2 32 50
6 10
25 33 40 52 65