+ Reply to Thread
Results 1 to 13 of 13

Sorting data into columns

  1. #1
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Sorting data into columns

    I need help with either a formula or macro for sorting data into specific columns. I need the entries under the headings Ar,Bj... to be sorted into the correct columns. To add to the problem, the data may not be exactly the same as the heading.

    Attached is an simple example of a spreadsheet where the top is the original and the bottom is what I need the final outcome to be. The data is pasted from a different spreadsheet and will be changing each time.

    All help is much appreciated.
    Attached Files Attached Files
    Last edited by MikeNZ; 08-11-2009 at 10:06 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Sorting data into columns

    This puts results on sheet2, and works for your example, but you may have to elaborate on precisely this means:
    the data may not be exactly the same as the heading.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting data into columns

    Give this a try:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Re: Sorting data into columns

    Thanks JB, that seems to work. If I have any issues I'll repost.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting data into columns

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  6. #6
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Re: Sorting data into columns

    It worked well for the sample but when I tried to adjust it for the actual sheet I was having a bit of trouble. I'm very new to macros and VBA so if you could explain some of the processes it would be awesome.

    I've attached the actual sheet I would use.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Sorting data into columns

    Please can you acknowledge my post even if the code doesn't work or you don't use it?

  8. #8
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Re: Sorting data into columns

    My apologies Stephen. Is the code you wrote for transferring from one spreadsheet to another?

  9. #9
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Sorting data into columns

    No problem Mike, just wanted to check you'd seen it. It should do what you want, putting the results on a separate sheet - try it and see!

  10. #10
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Re: Sorting data into columns

    Stephen, it worked perfectly for the sample but is there any way to have it work for the one sheet and not copy to another? I'm very new to macros and VBA so if you could explain some of the processes it would be awesome.

    I've attached the actual sheet I would use.
    Attached Files Attached Files

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting data into columns

    As per forum rules, cross-posting requires you link to the other forums where you've posted this question here in the link.

    http://www.mrexcel.com/forum/showthread.php?t=407749

  12. #12
    Registered User
    Join Date
    12-27-2008
    Location
    Christchurch, New Zealand
    Posts
    92

    Re: Sorting data into columns

    Apologie, I hadn't read the rules correctly.

    Are you able to help with that example?

    http://www.mrexcel.com/forum/showthread.php?t=407749

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting data into columns

    Try this on your sheet:
    Please Login or Register  to view this content.

+ 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