+ Reply to Thread
Results 1 to 10 of 10

Convert Array into 2 columns

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2010
    Posts
    14

    Convert Array into 2 columns

    Hi there,

    I have a bunch of data that has been provided to me in a very difficult format to sort (for me at least).

    I would like to convert an array into two columns, one for "X" and one for "Z". The data is arranged going from left to right, top to bottom with the appropriate X and Z data beside each other.

    An excel spreadsheet is attached where I show what I would like the output to be (I can organize it with Brute force but I have to repeat this process many, many times!)

    Thanks in advance
    Attached Files Attached Files
    Maxim S

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Convert Array into 2 columns

    Try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Convert Array into 2 columns

    as an option
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-06-2012
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Convert Array into 2 columns

    Jindon- thanks for the input, but the code you posted as some glitches in it and I don't know VBA well enough to fix it

    Nilem- your code almost works perfect; is there anyway to program it to add a break between each array? Each array has to be sorted largest-smallest in their own columns.

    Thanks for the support!

  5. #5
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Convert Array into 2 columns

    Well I had this sitting on my PC while I went to a meeting so a may as well post it. Another way.

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Convert Array into 2 columns

    Hey Guys,

    Try my method too. I should have realized it had already been solved. Compare code??
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Convert Array into 2 columns

    Quote Originally Posted by Emou View Post
    Jindon- thanks for the input, but the code you posted as some glitches in it and I don't know VBA well enough to fix it
    I don't understand what you mean.
    Try the attached.
    Attached Files Attached Files

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Convert Array into 2 columns

    Quote Originally Posted by Emou View Post
    ...is there anyway to program it to add a break between each array? Each array has to be sorted largest-smallest in their own columns...
    another ertert
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-06-2012
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Convert Array into 2 columns

    Wow! Thank you so much Nilem, that worked so well! :D

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Convert Array into 2 columns

    @ Emou

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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