+ Reply to Thread
Results 1 to 7 of 7

Rearranging data in excel

  1. #1
    Forum Contributor
    Join Date
    07-19-2017
    Location
    usa
    MS-Off Ver
    2016 Professional Plus
    Posts
    128

    Rearranging data in excel

    Hi,
    I have provided excel list where column A contains certain words row by row. Is it possible to take data from 10 cells(A1:A10). and group them in one cell like B1 where each value is in new line. Similarly, data from (A11:A20) into cell B2 and This process goes on.

    I hope the problem is clear. Let me know about your thoughts.

    Thanks and Regards,
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Rearranging data in excel

    With Excel 2007, you cannot use TEXTJOIN. So here is a simple UDF to do what you want:

    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Then use this, copied down:
    =concatall(OFFSET($A$1,10*(ROWS($1:1)-1),,10,),CHAR(10))

    You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.

    These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    07-19-2017
    Location
    usa
    MS-Off Ver
    2016 Professional Plus
    Posts
    128

    Re: Rearranging data in excel

    Hi Glenn! Thank you so much. This method works fine. For sake of generalization, if I want to concatenate 100 URLs instead of 10. Which parameter do I have to change in both VBA and Formula?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Rearranging data in excel

    In the VBA... nothing. That's why I use it... I don't have to know ANYTHING about VBA. In the formula:

    =concatall(OFFSET($A$1,100*(ROWS($1:1)-1),,100,),CHAR(10))

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  5. #5
    Forum Contributor
    Join Date
    07-19-2017
    Location
    usa
    MS-Off Ver
    2016 Professional Plus
    Posts
    128

    Re: Rearranging data in excel

    Yes It is working fine perfectly. Thanks again

  6. #6
    Forum Contributor
    Join Date
    07-19-2017
    Location
    usa
    MS-Off Ver
    2016 Professional Plus
    Posts
    128

    Re: Rearranging data in excel

    It's fine. No Issue. My Bad.
    Attached Files Attached Files
    Last edited by anonymous321; 12-01-2020 at 10:19 AM.

  7. #7
    Forum Contributor
    Join Date
    07-19-2017
    Location
    usa
    MS-Off Ver
    2016 Professional Plus
    Posts
    128

    Re: Rearranging data in excel

    Quote Originally Posted by Glenn Kennedy View Post
    In the VBA... nothing. That's why I use it... I don't have to know ANYTHING about VBA. In the formula:

    =concatall(OFFSET($A$1,100*(ROWS($1:1)-1),,100,),CHAR(10))

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Please check the attached file. The formula doesn't work on the attached file for some reason.
    Attached Files Attached Files

+ 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. Rearranging data dump to excel
    By rosiedog1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2015, 02:17 PM
  2. Replies: 1
    Last Post: 02-17-2014, 01:39 PM
  3. Excel VBA help rearranging data on worksheet
    By hauntedfarm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2014, 10:15 AM
  4. [SOLVED] rearranging data using VBA
    By longhorn23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2013, 05:21 PM
  5. Rearranging Data
    By slolux in forum Excel General
    Replies: 2
    Last Post: 03-21-2013, 12:28 AM
  6. Excel 2007 : Rearranging data
    By gunner in forum Excel General
    Replies: 4
    Last Post: 10-12-2010, 10:12 AM
  7. Rearranging Data in Excel
    By Keensie in forum Excel General
    Replies: 1
    Last Post: 04-21-2006, 09:03 AM

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