Moving Cells by classification...???

G

Guest

Guest
Suppose I have a list as follows:

Col A Col B
-----------------
part1 10
part1 15
part1 11
part1 12
part2 18
part2 15
part2 22
part3 14
part3 17
part3 16
part3 14

How could I go through the list and output this?

Col A Col B C D E
------------------------------------
part1 10 15 11 12
part2 18 15 22
part3 14 17 16 14

I know how to do this in C++ or any other programming language besides VB! But I'd like to learn. Need some automated way of doing this for a long, long spreadsheet. Any help is greatly appreciated.

Steve
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
With your data...

{"part1",10
;"part1",15
;"part1",11
;"part1",12
;"part2",18
;"part2",15
;"part2",22
;"part3",14
;"part3",17
;"part3",16
;"part3",14}

...in cells A2:B12 enter the formula, =(A2<>A3)+0, into C2 and the formula, =IF(A2=A1,D1&","&B2,B2), into D2. Fill both of these formulas down to the last data row. Perform a Copy/Paste Special Values on columns C:D. Apply an AutoFilter on column C displaying and then deleting rows containing 0 in column C. Remove the AutoFilter, select column D, and choose the Data | Text to Columns... menu command specifying comma delimitation. Delete column C.
 
Upvote 0

Forum statistics

Threads
1,213,495
Messages
6,113,992
Members
448,538
Latest member
alex78

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