+ Reply to Thread
Results 1 to 2 of 2

Sorting 2 data ranges by comparing one column in each and sorting to match

  1. #1
    Registered User
    Join Date
    02-14-2007
    Posts
    1

    Sorting 2 data ranges by comparing one column in each and sorting to match

    Hi all, sorry about the long winded title but i guess if knew what to call what i wanted to do i may have had more luck finding an answer using Uncle Google.

    I have been trying to use Excel to sort data in this particular way for quite few years and never had any luck. I do have a work around using Microsoft Access but it is pretty long winded and involves a lot of imorting and exporting and recombiming data sets and spreadsheets.

    In the example below, i'd like to match the second set of data to the first set of data based on the contents of G compared to B.
    I have worked out ways to report repeats and colour cells that are repeated but i'd like the data to sort itself as per the lower data set. So, matched where there is agreement between columns but inserting blank lines in either data range where there is no match.

    This may well be a step too far for Excel but it has been a thorn in my side for quite a few years now. Potential problem, i'm no VB script writer. Having said that though, i have had some success in the past adapting code that i have found on various forums to suit my needs.

    Any help would be much appreciated, even if it is to say "sorry fella, you ain't gonna be doing that without a degree in computer programming". At least i can put it to bed then.

    Thanks in advance for any and all help.

    Smiffy

    original data
    A B C D E F G H
    point 1 abc 215 point 1 sjh 195
    point 2 sjh 652 point 2 dek 555
    point 3 njd 549 point 3 igd 645
    point 4 ksi 562 point 4 mo 726
    point 5 igd 147 point 5 ako 822
    point 6 bad 562 point 6 sae 471
    point 7 mo 361 point 7 ubb 14
    point 8 ako 622
    point 9 qok 514
    point 10 lna 698
    point 11 ubb 477

    required output
    A B C D E F G H
    point 1 abc 215
    point 2 sjh 652 point 1 sjh 195
    point 2 dek 555
    point 3 njd 549
    point 4 ksi 562
    point 5 igd 147 point 3 igd 645
    point 6 bad 562
    point 7 mo 361 point 4 mo 726
    point 8 ako 622 point 5 ako 822
    point 6 sae 471
    point 9 qok 514
    point 10 lna 698
    point 11 ubb 477 point 7 ubb 14

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Sorting 2 data ranges by comparing one column in each and sorting to match

    smiffy, welcome to the forum.

    As you can probably see, it isn't very clear what data should be lining up in which column. I suggest you upload your sample in a workbook, to have a better chance of getting a solution.

    Hope this helps.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

+ 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