+ Reply to Thread
Results 1 to 7 of 7

reformatting matrix into a single column

  1. #1
    Registered User
    Join Date
    05-27-2014
    Posts
    3

    reformatting matrix into a single column

    Hello,

    I have a matrix that looks like this:

    1 2 3
    4 5 6
    7 8 9
    10 11 12

    And would like to rearrange this data to:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    In actuality it's a 110000 x 3 matrix that should become a 330000 x 1 column.
    Can anyone help me with this?
    Many thanks in advance.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: reformatting matrix into a single column

    With your matrix data in columns A:C use

    =INDEX(A:C,CEILING(ROW(A1)/3,1),MOD(ROW(A1)-1,3)+1)

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: reformatting matrix into a single column

    do you want your matrix to move like
    1 row 1column then 1row second column then 1 row third column and so on
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  4. #4
    Registered User
    Join Date
    05-27-2014
    Posts
    3

    Re: reformatting matrix into a single column

    Quote Originally Posted by Ace_XL View Post
    With your matrix data in columns A:C use

    =INDEX(A:C,CEILING(ROW(A1)/3,1),MOD(ROW(A1)-1,3)+1)

    Copy down
    I guess I should have made clear that the entries in the matrix are not actually numbers, but pieces of text

    So:



    alpha bravo charlie
    delta echo foxtrot
    golf hotel india
    juliet kilo lima

    should become

    alpha
    bravo
    charlie
    delta
    echo
    foxtrot
    golf
    hotel
    india
    juliet
    kilo
    lima

    Sorry about that. Many thanks in advance

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: reformatting matrix into a single column

    Try this array formula

    =IFERROR(INDIRECT(TEXT(SMALL(IF(A$1:C$10<>"",ROW(A$1:C$10)*10^4+COLUMN(A$1:C$10)),ROWS(D$2:D2)),"R0000C0000"),0),"")

    A
    B
    C
    D
    1
    alpha bravo charlie alpha
    2
    delta echo foxtrot bravo
    3
    golf hotel india charlie
    4
    juliet kilo lima delta
    5
    echo
    6
    foxtrot
    7
    golf
    8
    hotel
    9
    india
    10
    juliet
    11
    kilo
    12
    lima
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: reformatting matrix into a single column

    I guess I should have made clear that the entries in the matrix are not actually numbers, but pieces of text
    The formula in post #2 will still work..try it!

    @Allkey - I'm not sure having an array formula across 33000 rows is something I wanna try

  7. #7
    Registered User
    Join Date
    05-27-2014
    Posts
    3

    Re: reformatting matrix into a single column

    Quote Originally Posted by Ace_XL View Post
    The formula in post #2 will still work..try it!
    Ha, indeed it id! Thank you very much, you're a hero.
    Also thanks to the others who offered their help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 12-20-2010, 06:59 AM
  2. Matrix to single column
    By chris.veinot in forum Excel General
    Replies: 4
    Last Post: 07-16-2010, 09:10 AM
  3. Convert Matrix to Single Column [ROW by Row]
    By K1bb5 in forum Excel General
    Replies: 2
    Last Post: 07-09-2010, 08:55 AM
  4. Converting a matrix into a single column
    By dthan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-21-2008, 05:56 PM
  5. Matrix to single column
    By RD Wirr in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-04-2006, 05:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1