Ashok K Harnal
Ashok K Harnal

Reputation: 1221

Rearrange and regroup stacked data

I have Excel data as follows:

Mon  34
Mon  76
Mon  86
Tue  24
Tue  34
Tue  66
Wed  88
Wed  89
Wed  87

Is there a way with a formula to rewrite this data as follows:

Mon   Tue   Wed
34    24    88
76    66    89
86    66    87

Upvotes: 0

Views: 61

Answers (1)

pnuts
pnuts

Reputation: 59475

Assuming 76 is in B2, insert a column on the left and a row above. Label the columns (say ID, day and value) and in A2 enter 1 and series fill down to A4. Then select A2:A4 and series fill down to suit.

Build a PivotTable with ID for ROWS, day for COLUMNS and value for VALUES.

Won't give quite the result you show from the data sample:

SO28183043 example

Upvotes: 2

Related Questions