Forum Discussion

MHulten's avatar
MHulten
Copper Contributor
Nov 10, 2021
Solved

Transpose rows and join with row header using formula

Hi! I need to use a formula (not macro) to transpose a table and return another table based on the row header and each individual column value. Optionally a textjoin of the combination cold work. ...
  • SergeiBaklan's avatar
    SergeiBaklan
    Nov 10, 2021

    MHulten 

    That could be

    =LET(
      rws,     ROWS(Table1),
      cls,     COLUMNS(Table1),
      k,       SEQUENCE(rws*(cls-1)),
      i,       MOD( k-1, cls-1)+2,
      j,       INT( (k-1)/(cls-1)) +1,
      postfix, INDEX( Table1, j, i ),
      all,     IF( ISBLANK(postfix), "",   INDEX( Table1, j,1 ) & "-" & postfix),
      FILTER(all, all<>"") )

Resources