+ Reply to Thread
Results 1 to 9 of 9

Formula for converting a long row of cells into multiple rows

  1. #1
    Registered User
    Join Date
    02-12-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Excel2015
    Posts
    5

    Formula for converting a long row of cells into multiple rows

    I cannot figure out a formula to convert the data from looking like this:

    Column: C D E F G H I J K L M N O P Q
    Row One 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

    and make it look like this starting in cell R1:

    Column: R S T U V
    Row One 1 2 3 4 5
    Row Two 6 7 8 9 10
    Row Three 11 12 13 14 15

    Can anyone help with this? Need a formula, macro will not work.

    Thanks!
    Last edited by ntmdv1; 02-17-2015 at 06:50 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula for converting a long row of cells into multiple rows

    Put this formula in R1:

    =INDEX($C$1:$Q$1,COLUMNS($R:R)+(ROWS($1:1)-1)*5)

    then copy across and down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-12-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Excel2015
    Posts
    5

    Re: Formula for converting a long row of cells into multiple rows

    Yes this works, thanks Pete!

    Now, is there any way to have the formula repeat breaking down the long row of cells in C2 into 3 rows, then C3, etc. all the way to C15?

    Many thanks!
    Last edited by ntmdv1; 02-17-2015 at 08:10 PM.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula for converting a long row of cells into multiple rows

    Do you mean C7, D7,E7, then C8, D8, E8 and so on ? (Those are columns that it is going across).

    If so, put the formula in C7, change the 5 at the end to 3, then copy across and down.

    Pete

  5. #5
    Registered User
    Join Date
    02-12-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Excel2015
    Posts
    5

    Re: Formula for converting a long row of cells into multiple rows

    Sorry, I edited my prior post to the right cells. Hopefully it makes more sense in what I am trying to do.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula for converting a long row of cells into multiple rows

    Attach a sample file showing what you want to achieve (and in which cells), as I can't really understand your edited post.

    Pete

  7. #7
    Registered User
    Join Date
    02-12-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Excel2015
    Posts
    5

    Re: Formula for converting a long row of cells into multiple rows

    So essentially:

    Column: C D E F G H I J K L M N O P Q
    Row One 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    Row Two 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
    and make it look like this starting in cell R1:

    Column: R S T U V
    Row One 1 2 3 4 5
    Row Two 6 7 8 9 10
    Row Three 11 12 13 14 15
    Row Four 16 17 18 19 20
    Row Five 21 22 23 24 25
    Row Six 26 27 28 29 30

    ...and keep repeating that format through row C15 of the original data set?

  8. #8
    Registered User
    Join Date
    02-12-2015
    Location
    Denver, Colorado
    MS-Off Ver
    Excel2015
    Posts
    5

    Re: Formula for converting a long row of cells into multiple rows

    Pete- Hope this helps.

    Thanks again!
    Attached Files Attached Files

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Formula for converting a long row of cells into multiple rows

    Okay, put this in R1:

    =INDEX($C$1:$Q$15,INT((COLUMNS($R:R)+(ROWS($1:1)-1)*5-1)/15)+1,MOD(COLUMNS($R:R)+(ROWS($1:1)-1)*5-1,15)+1)

    then copy across to V1, and down as far as you need.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Converting Rows Into Multiple Rows - Large Data Set
    By nisiwi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-21-2014, 04:53 PM
  2. Replies: 1
    Last Post: 04-25-2013, 08:40 PM
  3. Converting multiple columns to rows / Converting to Panel Data
    By Stuart11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2013, 05:50 AM
  4. Converting Long If Then Excel Formula to VBA
    By KD Gordon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 04:05 AM
  5. converting long formula to VBA
    By hamboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2005, 07:39 PM

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