Transpose Rows/Cols of Table - single formula

How It Works
each line explained…

  • the List() produces a list of lists or 2d matrix of the table contents
  • we call that matrix V so we can refer to it below
  • for J=1 to NrCols - Count(V) is the number of columns
  • for I=1 to NrRows - Count(V.First()) is the number of rows
  • build a new matrix that is transposed - V[I,J] is in row then column order
  • next I
  • next J
  • traverse the transposed matrix rows the columns
  • pad-out the cell and make it fixed-size-font, end with a newline

The resulting display is the contents of the Original table with the rows and columns transposed

Max

7 Likes