Hi there,
I have a two columns. One with a group (in this case colour) and the other column with a number. I want to transpose the data so that I have multiple columns based on the groups in the first column.
Could someone point how to:
So from this:
To this:
Thanks, StioB
I have a two columns. One with a group (in this case colour) and the other column with a number. I want to transpose the data so that I have multiple columns based on the groups in the first column.
Could someone point how to:
- Either get this format from pivot tables (I tried but couldn’t get the values in the cells of the table).
- Describe the macro VBA code to produce this.
So from this:
colour | number |
blue | 65 |
black | 63 |
red | 43 |
yellow | 96 |
green | 97 |
purple | 52 |
pink | 48 |
blue | 22 |
black | 69 |
red | 29 |
yellow | 32 |
green | 62 |
purple | 53 |
pink | 34 |
blue | 75 |
black | 60 |
red | 47 |
yellow | 33 |
green | 36 |
purple | 65 |
pink | 42 |
To this:
black | blue | green | pink | purple | red | yellow |
63 | 65 | 97 | 48 | 52 | 43 | 96 |
69 | 22 | 62 | 34 | 53 | 29 | 32 |
60 | 75 | 36 | 42 | 65 | 47 | 33 |
Thanks, StioB