Data Format / Turning Column into Rows (Excel or any other program)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dan2k3k4
    Member
    • Oct 2003
    • 1283

    #1

    Data Format / Turning Column into Rows (Excel or any other program)

    I have a .csv file with the first column having about 40 different variable names, then the second column having the value for each variable name... the list has around 45,900 rows...

    Basically I want to reduce that by turning the duplicated variable names into a title row, then just having each row containing each value in the correct column.

    So basically what I want to do is change something like this:

    Code:
    Func1,Val1
    Func2,Val2
    Func3,Val3
    Func1,Val1p1
    Func2,Val2p2
    Func3,Val3p3
    Func1,Val1q1
    Func2,Val2q2
    Func3,Val3q3
    Into something like this:

    Code:
    Func1,Func2,Func3
    Val1,Val2,Val3
    Val1p1,Val2p2,Val3p3
    Val1q1,Val2q2,Val3q3
    I just don't know how I would go about doing this, I'm sure there is a program already built // or a feature in Excel (or w.e) that can do this for me...

    It's similar to creating a pivot table, except it's not a pivot table since I tried that and it just listed it like this:

    Code:
    Func1:
    Val1
    Valp1
    Valq1
    
    Func2:
    Val2
    Valp2
    Valq2
    
    Func3:
    Val3
    Valp3
    Valq3
    And I wouldn't be able to edit it easily... I want to keep the file as csv (text file delim'd with commas)

    So the 'title row' will have 40 columns, and each row after that will also have 40 columns.

    So, does anyone know of a program that already does this?

    Cheers
  • pennywise

    #2
    Re: Data Format / Turning Column into Rows (Excel or any other program)

    There's bound to be some sort of VB script that does this.

    Comment

    Working...