+ Reply to Thread
Results 1 to 13 of 13

Transpose Array to Single Column

  1. #1
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Transpose Array to Single Column

    Hi Folks,

    I'm trying to transpose an array of data into a single column. The array will eventually be around 30 columns wide by thousands of rows long, unlike the example that is currently set at 10x15. The formula I am looking for needs to list the row data in a columnar format as shown in column S and not olny that, it's needs to reference the respective ID number from Column A (see column T). The colour coding I have set up is pretty self explanatory.

    Thanks in advance.

    transpose2.xlsx
    Regards,

    jeversf

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transpose Array to Single Column

    With the code below you can transpose the data, like you showed.

    There where no data in row 1 from column H and further, so I added an formula.

    It does not split the values of (e.g.) cell c6 into column (first).

    Edit:

    To split the data in column C, you could probably use text to column in excel 2007 and use ; (semicolon) as seperator.
    Since I don't have excel 2007 available on the moment I can test that for you.


    See the attached file.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by oeldere; 09-05-2014 at 03:48 AM. Reason: edit:
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Transpose Array to Single Column

    Thanks for that oeldere, it seems to work very well. I did use the text to column function to extract the data in columns I:P.

    Is there a way to do this without using VBA though, the people who will eventually use this document are better with formulas than coding?

    Thanks once again.

  4. #4
    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: Transpose Array to Single Column

    You can use this formula. In I4 and pull it to the right until you see blanks.

    =TRIM(MID(SUBSTITUTE($B4,";",REPT(" ",255)),(COLUMNS($A:A)-1)*255+1,255))
    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

  5. #5
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Transpose Array to Single Column

    Nice formula Alkey! I'll definitely use that one as an alternative to "Text to Columns". Unfortulately my problem lies in transposing the data into a single column (see column S and T). I'm hoping there is a formula solution that can do exactly the same as what oeldere provided in his VBA suggestion.

  6. #6
    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: Transpose Array to Single Column

    Oh, boy! Sorry, I misread your requirements. Unfortunately, the only way to get it down would be with VBA. The solution offered by oeldere is exactly what you need.

  7. #7
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Transpose Array to Single Column

    Seems like I have to study up on VBA coding now . Thank you both for your assitance in this regard.

    If you wouldn't mind, could you break down the VBA code for me so that I can get an idea of what it's actually doing. As mentioned in my first post the data I will be dealing with will be considerably larger and I would like to be able to customise the VBA code accordingly (i.e. change search range). I just tried adding a few extra pieces of data to the sample and the OutPut tab remained the same. Is there something I need to do to 'initiate/activate' the code so that it continually updates the OutPut tab?

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transpose Array to Single Column

    Please Login or Register  to view this content.
    general setting to the code.

    Please Login or Register  to view this content.
    code for making (and checking if the sheet Output exist) a new worksheet output

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Hope I explained well enough.

    Please reply.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Transpose Array to Single Column

    Since you posted this in the Formula & Functions forum, I presume you were originally hoping for a purely formula-based solution?

    That can be done, and is not overly complex, though with the size of your dataset it would certainly be best achieved using VBA, as you have been given.

    However, if you absolutely insist on a formula-based solution (and I would't necessarily recommend it for the size of the dataset that you have) then let me know and I will take you through the steps.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  10. #10
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Transpose Array to Single Column

    I would be interested XOR LX, thank you. As you say I will probably have to use the VBA for this exercise, but I would definitely like to know how to do it for smaller data sets.
    Last edited by jeversf; 09-07-2014 at 02:38 AM.

  11. #11
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: Transpose Array to Single Column

    Thank you oeldere for the step by step guide, it does make a lot more sense now and I will have to play around with it some more to really understand it's working. A few questions though:

    1. Should the Output tab update automatically every time data is changed in the source tab?
    2. If I were to assign a macro to a text box, would this run the vba code that you set up and generate the Output tab?

    I guess what I'm trying to figure out is, if the Output tab doesn't update automatically, how would I generate a new list every time the source data changes.

    Thanks to all for your help so far.

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transpose Array to Single Column

    1) only if you run the macro again.

    2) ?

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Transpose Array to Single Column

    Quote Originally Posted by jeversf View Post
    I would be interested XOR LX, thank you. As you say I will probably have to use the VBA for this exercise, but I would definitely like to know how to do it for smaller data sets.
    Perhaps have a look at the technique outlined here and see if you can adapt it to your needs, should you wish to:

    http://excelxor.com/2014/08/24/singl...-1-rows-first/

    If you need any help with it let me know.

    Regards

+ 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. [SOLVED] Text to Column with Single Column Transpose - VBA code help
    By i2rule in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-13-2014, 05:09 PM
  2. [SOLVED] transpose two-dimensional array to single column
    By ajan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-15-2014, 03:32 PM
  3. Transpose Data from Multiple Column to Single Column
    By smudger1989 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-12-2013, 04:38 AM
  4. [SOLVED] Transpose a single column to a single row with duplicates removed
    By ggilzow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2013, 10:50 AM
  5. TRANSPOSE function returns incorrect value when array has single value
    By bpeikes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-28-2012, 04:40 AM

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