I'm trying to take a dataset that looks like this:

And transform the records into this format:

The resulting format would have two columns, one for the old column names and one column for the values. If there are 10,000 rows then there should be 10,000 groups of data in the new format.
I'm open to all different methods, excel formulas, sql (mysql), or straight ruby code would work for me also. What is the best way to tackle this problem?
You could add an ID column to the left of your data and use a Reverse PivotTable method.
Press Alt+D+P to access the Pivottable Wizard with the steps:
1. Multiple Consolidation Ranges
2a. I will create the page fields
2b. Range: eg. sheet1!A1:A4
How Many Page Fields: 0
3. Existing Worksheet: H1
In the PivotTable:
Uncheck Row and Column from the Field List
Double-Click the Grand Total as shown

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With