copy data from sheet1 to sheet2 with transpose value

  • This macro assumes you have a sheet named "Shee2" with these headers in row 1.

    id name value


    You can say "THANK YOU" for help received by clicking the "Like" icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • An alternative solution is a simple unpivot using Power Query/Get and Transform Data


    Code
    let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"id", "name"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
    in
    #"Removed Columns"

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!