Search code examples
google-sheetsgoogle-sheets-formula

Transform Table in Google Sheet


I have a table like below:

Name Age Address Course Year
John 18 Albert Garden Business 2020

Can I transpose the table into the below format?

Name Column Value
John Age 18
John Address Albert Garden
John Course Business
John Year 2020

Solution

  • You may try:

    =reduce(tocol(,1),B2:index(E:E,match(,0/(A:A<>""))),lambda(a,c,vstack(a,hstack(index(A:A,row(c)),index(1:1,column(c)),c))))
    

    enter image description here