How to convert a matrix to a single column using Excel

后端 未结 3 1510
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-31 15:00

I have the following matrix in Excel:

3 Columns: A, B, C

Row 1: a b c

Row 2: d e f

3条回答
  •  离开以前
    2020-12-31 15:28

    This was already covered in Item 2 from the very general

    Excel: Formulas for converting data among column / row / matrix :

    The top cell of your target range (say, $H$1) should contain

    =INDEX($A$1:$C$3,INT((ROW()-ROW($H$1))/3)+1,MOD(ROW()-ROW($H$1),3)+1)
    

    where $A$1:$C$3 cotains your source data. Copy the formula downwards as needed.

    You could also use

    =OFFSET($A$1,INT((ROW()-ROW($H$1))/3),MOD(ROW()-ROW($H$1),3))
    

    as metioned in the referred article.

提交回复
热议问题