+ Reply to Thread
Results 1 to 7 of 7

Aligning rows between 2 columns.

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Minneapolis, USA
    MS-Off Ver
    Excel 365
    Posts
    8

    Aligning rows between 2 columns.

    Hello,

    I am trying to create a macro / formula in my excel sheet. I have student numbers in column A and column G. What I want to accomplish is align columns A and G so that the same student number is aligned on the same row (They are currently mixed, some student numbers exist in A that dont exist in B, and vice versa). For the ones that dont exist in both, I want a blank row inserted. Good news is, There are no duplicate student numbers. Hopefully my attached image is more clear:

    I want to thank you in advance for your help and it is really appreciated.
    Attached Images Attached Images

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Aligning rows between 2 columns.

    I'm assuming student numbers will never repeat in each data set?

    Can you attach the workbook you attached a picture of so we can experiment?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Minneapolis, USA
    MS-Off Ver
    Excel 365
    Posts
    8

    Re: Aligning rows between 2 columns.

    Correct, I have checked for any duplicates through a pivot table. thank you for your help. I have attached the excel sheet

    (I have made a dummy workout, I cannot attach the real thing since it is highly sensitive information. The actual workout has 24000 student numbers in each column A+G, not sure if this information is relevent but thought I would let you know)
    Attached Files Attached Files
    Last edited by dg3; 07-26-2013 at 09:42 AM.

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Aligning rows between 2 columns.

    Try this :-
    This gives the right groupings not necessarily in the right order, Results start "M1"
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Aligning rows between 2 columns.

    Try this for an alternative layout for the results:-
    Please Login or Register  to view this content.
    Regards Mick
    Last edited by MickG; 07-26-2013 at 01:55 PM.

  6. #6
    Registered User
    Join Date
    07-26-2013
    Location
    Minneapolis, USA
    MS-Off Ver
    Excel 365
    Posts
    8

    Re: Aligning rows between 2 columns.

    Mick, that worked absolutely great. Thank you so much I really appreciate this you have made my life much much easier.

  7. #7
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Aligning rows between 2 columns.

    You're welcome
    Regrds Mick

+ 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] Aligning rows, across 3 columns
    By dpsersimon in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-26-2013, 08:52 PM
  2. aligning rows to multiple columns
    By jacksage in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 12:03 PM
  3. Replies: 4
    Last Post: 08-20-2010, 02:34 PM
  4. Replies: 23
    Last Post: 08-12-2010, 04:42 PM
  5. Replies: 4
    Last Post: 05-03-2010, 07:14 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