Results 1 to 5 of 5

Thread: One Column to Multiple Columns at Interval (snaking columns)

  1. #1
    Conjurer Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    131
    Articles
    0
    Excel Version
    Office 365

    One Column to Multiple Columns at Interval (snaking columns)



    Register for a FREE account, and/
    or Log in to avoid these ads!

    My full list will be over 1000 items and I'd like to split it into groups of 33 (obviously the last column will not have the full count)

    Attached is just a sample, I would like to take one column and split it into multiple columns at a set interval of 20 items into 4 groups of 5.
    #
    13069
    14249
    14272
    16010
    16022
    16023
    16044
    16045
    16070
    16103
    17012
    17036
    17067
    17096
    17123
    17142
    17155
    17163
    17177
    17182

    Into this:

    Column1 Column2 Column3 Column4
    13069 16023 17012 17142
    14249 16044 17036 17155
    14272 16045 17067 17163
    16010 16070 17096 17177
    16022 16103 17123 17182

    Basically a function that will take a column and a number and it will parse that column into multiple columns contain n-items.
    Attached Files Attached Files
    Oh... by the way, YOU'RE WELCOME!

  2. #2
    Conjurer Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    131
    Articles
    0
    Excel Version
    Office 365
    Well...dang, answering my own question again....looking through the docs (#shared) List.Split() is what I need.

    Code:
    = Table.FromColumns(List.Split(Source[#"#"],5))
    Oh... by the way, YOU'RE WELCOME!

  3. #3
    Conjurer pinarello's Avatar
    Join Date
    Jun 2019
    Location
    Germany
    Posts
    135
    Articles
    0
    Excel Version
    Office 365
    In post #12 of the following link you will find a solution where you can flexibly specify how many columns or rows should be generated.


    https://www.excelguru.ca/forums/show...ltiple-columns
    Last edited by pinarello; 2021-09-22 at 11:41 PM.

  4. #4
    Conjurer Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    131
    Articles
    0
    Excel Version
    Office 365
    Quote Originally Posted by pinarello View Post
    In post #12 of the following link you will find a solution where you can flexibly specify how many columns or rows should be generated.


    https://www.excelguru.ca/forums/show...ltiple-columns
    Thanks!

    The List.Split() accomplishes the same task and worked perfectly for me.
    Oh... by the way, YOU'RE WELCOME!

  5. #5
    Conjurer alansidman's Avatar
    Join Date
    Oct 2018
    Location
    Steamboat Springs
    Posts
    343
    Articles
    0
    Excel Version
    O365
    Nick,
    Thanks for your simple solution. Very much liking this!!

    Alan

Posting Permissions

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