Forum Discussion

lsantan3's avatar
lsantan3
Copper Contributor
Apr 12, 2023
Solved

How to convert a generic matrix into a column vector?

Suppose I have the following matrix: 1 2 3 4 5 6 7 8 9 10 11 12   And I want to convert this matrix into a column vector, such that the order of elements allocated into the ...
  • Harun24HR's avatar
    Apr 13, 2023

    lsantan3 If you are on Microsoft-365 then could use TOCOL() function.

    =TOCOL(A1:C4)

    For Excel-2019, 2021 could utilize FILTERXML() with TEXTJOIN()

    =INDEX(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,$A$1:$C$4)&"</s></t>","//s"),ROW(1:1))

     

     

Resources