+ Reply to Thread
Results 1 to 8 of 8

Matching similiar columns

  1. #1
    Registered User
    Join Date
    05-02-2010
    Location
    USA
    MS-Off Ver
    Excel 2010, 2013
    Posts
    11

    Matching similiar columns

    Alright, I'm an Excel rookie and I'm wondering if it will do what I need it to. My goal is to match the same "item" numbers with each other. If you look at the "before" attachment, do you see how the E and F columns have some of the same numbers in them (6, 10, 18, 24)? I'm hoping there is a way to sort the information so that the rows with the same numbers in columns E and F will be next to each other. In the "after" attachment, do you see how E and F columns are sorted so that the numbers are in numerical order? All of the information to the left of E and the right of F didn't change but they are now sorted in order. Column F has 2 then E has 3 F has 4 and they both have 6 then F has 8, E has 9 and both have 10 again, etc.

    Please note that I'm using Excel XP, not 2007 like it shows in the screen shots.

    I don't know if this is even possible but any help would be appreciated. Thanks!!!
    Attached Images Attached Images
    Last edited by excelrookie82; 05-02-2010 at 02:31 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: I don't know if it's even possible, but...

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-02-2010
    Location
    USA
    MS-Off Ver
    Excel 2010, 2013
    Posts
    11

    Re: Matching similiar columns

    Sorry, I'm not even sure what I'm trying to do so I wasn't sure what to title the thread. I hope the new title works a little bit better?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Matching similiar columns

    Much better. I have a VBA routine that does this. Are you comfortable with that?

  5. #5
    Registered User
    Join Date
    05-02-2010
    Location
    USA
    MS-Off Ver
    Excel 2010, 2013
    Posts
    11

    Re: Matching similiar columns

    i have no clue what vba is

    or i should say, i don't know how to use and i barely know what vba is.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Matching similar columns

    The code is at the end of the post. Copy it to a code module as follows:

    Adding Code to a Sheet module
    1. Copy the code from the post
    2. Right-click on the tab for the relevant sheet and select View Code. This opens the Visual Basic Editor (VBE) and shows the object module for the selected worksheet.
    3. Paste the code in the window
    4. Press Alt+Q to close the VBE and return to Excel

    Then,

    1. Move col E to col A (select the column, hold down the Shift key, and drag it to col A).

    2. Select (what is now) A1, hold the Ctrl key, and select F1 (so that both are selected).

    3. In the Names box (left of the formula bar), type keys

    4. Do Alt+F8, and run AlignKeys.

    Please Login or Register  to view this content.
    Last edited by shg; 05-04-2010 at 10:08 AM.

  7. #7
    Registered User
    Join Date
    05-02-2010
    Location
    USA
    MS-Off Ver
    Excel 2010, 2013
    Posts
    11

    Re: Matching similiar columns

    I'll try this when I get to work tomorrow. Thanks for the help, I really really appreciate it!

  8. #8
    Registered User
    Join Date
    05-02-2010
    Location
    USA
    MS-Off Ver
    Excel 2010, 2013
    Posts
    11

    Re: Matching similiar columns

    thanks again. this worked like a charm! I really appreciate your help.

+ 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