Forum Discussion

lsantan3's avatar
lsantan3
Copper Contributor
Oct 03, 2022
Solved

In Excel, how do you rearrange a specific range of columns (of a given row) into separated rows?

The transpose function converts an entire row into one single column. This is not my goal. I want to reallocate a fixed range of columns (within a given row) into rows. For instance, suppose I have the table below:

 

0  1  2  
123456789
2212090656666553

 

Using excel, how can I reorganize the second row into a new table such that only the second row is used, and each new row of the new column corresponds to a range of 3 values from the original table? Something in which the outcome would be:

123
456
789

 

Thank you for your time !

  • lsantan3 

     

    If you have the Current channel of O365, you should be able to use WRAPROWS:

     

     

    If not, you could try something like this:

    Note that the third parameter of INDEX represents the column indices in the row you are trying to reshape. So, regardless of the values in that row, if you pass the index-structure into that parameter, it will wrap the row as required. 

     

    Note that in my culture, comma is the array column separator while semi-colon is the array row-separator.

     

5 Replies

  • flexyourdata's avatar
    flexyourdata
    Iron Contributor

    lsantan3 

     

    If you have the Current channel of O365, you should be able to use WRAPROWS:

     

     

    If not, you could try something like this:

    Note that the third parameter of INDEX represents the column indices in the row you are trying to reshape. So, regardless of the values in that row, if you pass the index-structure into that parameter, it will wrap the row as required. 

     

    Note that in my culture, comma is the array column separator while semi-colon is the array row-separator.

     

    • lsantan3's avatar
      lsantan3
      Copper Contributor
      Thank you so much, your solution is sublime!

Resources