+ Reply to Thread
Results 1 to 12 of 12

Copy and paste from random order to alpha-numeric order

  1. #1
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Copy and paste from random order to alpha-numeric order

    Hello all
    I suspect this is a very simple one for those who actually know what they are doing, but I could really use some help.

    I have a Workbook that contains 2 Sheets ("Names" & "Allocations"). In "Names" I have a list of Student Names in Col B, the student Gender in Col C and a Position (1A/1B/1C - 10A/10B/10C) in Col D. These are in no particular order. In "Allocations" I have the fixed Positions of 1ABC - 10ABC.

    What I am attempting to create is a macro that will take the list in "Names" and paste the name and gender alongside the respective Position in "Allocations".

    I have attached a workbook for clarification but, as I have tried various approaches and ended up with a mess only, I have not included any code.

    I would really appreciate your help.

    Many thanks
    John
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy and paste from random order to alpha-numeric order

    Maybe :

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    Wow. Awesome!
    That is exactly what I was after. Thank you so much for your help karedog.
    Cheers
    John

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy and paste from random order to alpha-numeric order

    You are welcome, glad I can help.


    Regards

  5. #5
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    Hi karedog

    I am having a slight problem using this code when the "Allocations" sheet is protected (with the particular target cells unlocked). Seems to be due to the use of CurrentRegion. Any suggestions?

    Many thanks
    John

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy and paste from random order to alpha-numeric order

    You can use this modification code :

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    That certainly has resolved the issue. Thanks karedog.
    I do still have one issue that I am struggling with if you still have the patience for it.
    I was hoping to be able to adapt the code so that it would achieve something like:
    Please Login or Register  to view this content.
    I'm so sorry for the changes - I thought I would be able to make the adaptation myself.

    Thanks again for all your help.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy and paste from random order to alpha-numeric order

    I cannot work without real file, so please upload your newest file with all data needed to solve it.

  9. #9
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    Hi again karedog
    Here is the attached file. As you will see, Cell A1 on the "Names" sheet has a drop-down of different classes. The sheet that the list is copied to should be determined by this value. Each configuration on the different sheets is a bit different (I did successfully adapt for "Allocations1" in Test3 macro). I wonder, also, if I could place in a check for duplicates within the original Positions column on the "Names" sheet..?
    Any help that you could provide would be enormously appreciated.
    Thanks (yet again).
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    It seems I have resolved all issues and requirements. I will post full code (once I have tidied it up a little) for any requiring it in future.

    Thank you very much for all your assistance karedog.

  11. #11
    Registered User
    Join Date
    02-23-2014
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Copy and paste from random order to alpha-numeric order

    Here is the Workbook containing the final code for anyone interested.

    The macro - searches list on "Names" sheet checking for duplicate positions then determines which macro to call (as different one required for different destination sheets) based on cell A1 in "Names" sheet. Calls the appropriate macro within that and transfers name and gender to the appropriate sheet.

    Many thanks to karedog and others for their help.
    Attached Files Attached Files

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy and paste from random order to alpha-numeric order

    Hi John, sorry for the late. I see that you have solved the new issue by yourself.
    Keep up the good work.


    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. Copy and paste sequential alpha numeric entries
    By Coral-Reefer in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-13-2015, 03:34 AM
  2. Replies: 4
    Last Post: 12-02-2014, 03:46 AM
  3. Replies: 1
    Last Post: 12-01-2014, 03:01 PM
  4. [SOLVED] Need a Formula that lists item by title heading and in alpha/numeric order
    By john dalton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-27-2014, 12:20 PM
  5. Opening Excel Workbooks in Alpha-Numeric Order
    By SKKMom in forum Excel General
    Replies: 0
    Last Post: 01-28-2014, 11:31 AM
  6. Sort The list of items by Alpha / numeric in their proper sequential order
    By DON_BLACK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 03:42 PM
  7. [SOLVED] Can I change the sort order to Alpha before Numeric?
    By gracy in forum Excel General
    Replies: 2
    Last Post: 05-19-2006, 04:20 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