+ Reply to Thread
Results 1 to 8 of 8

Displaying differences between two columns

  1. #1
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Displaying differences between two columns

    Hi guys, I have absolutely no background in excel but I'm aware that you can pretty much do anything imaginable with it. I've done some research online and found that my solution is possible, and actually seems pretty standard, but I have a few other questions. I need to filter 2 columns for differences, but instead of just showing which ones are different in a separate column, I was wondering if an entire new spreadsheet could be created with just the rows that have differences. I am filtering through thousands of words in comumn A and column B, and only 50 of the rows will have differences between the two columns, so if they could be completely separated from the pack it would make my life so much easier. Thanks for any input!

    EDIT: I just read through my post and I don't think I was very clear on what it is that I am doing. In Column A I have words and phrases that should EXACTLY match the corresponding node in column B. I need the filter to be case sensitive as well. Thanks
    Last edited by chadder44; 03-04-2010 at 02:18 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: need help displaying differences between two columns

    Have a look at the attached sample...

    The main database is in Sheet1 with Col A and Col B as your existing column A and B strings..

    in Column C2, entered formula:

    =SUMPRODUCT(--(NOT(EXACT(A$2:A2,B$2:B2))))

    this counts the number of Non-exact matches between A and B as you go down.

    in D2: =MAX(C:C) this gives the number of non matching rows total.

    If the calculations seem slow as you approach the bottom of the page, then try instead 2 helper columns as in F2: =EXACT(A2,B2) and G2: =COUNTIF(F$2:F2,FALSE) copied down (might be faster calcs)

    then in Sheet2, your result sheet, in A2:

    =IF(ROWS($A$1:$A1)>Sheet1!$D$2,"",INDEX(Sheet1!A:A,MATCH(ROWS($A$1:$A1),Sheet1!$C:$C,0)))

    copied over to next column(s) and down as far as necessary to get all information
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Displaying differences between two columns

    thanks a lot, that is pretty much perfect. I have one more question for you if you dont mind. I forgot to say that I have a 3rd column that is just an ID# label. So if I could copy that over to the 2nd sheet that would be perfect. Also, is this something that I can just add to many different lists that I have? You can look at my sample too.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Displaying differences between two columns

    Same formula(s) pretty much, just adjusted for the additional column being there.

    Then in sheet 2, formula is copied over 1 more column...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Displaying differences between two columns

    ok cool. So if I want to do this to a new spreadsheet, I have to paste these rules in everytime? Or is there a way that I can just load a layout and have it apply? thanks again.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Displaying differences between two columns

    You could probably get it done with a macro if you wanted.

    If that is what you want, repost in the Programming forum...and specifically mention that you want to automate with macro.

  7. #7
    Registered User
    Join Date
    03-04-2010
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Displaying differences between two columns

    ok thanks again.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Displaying differences between two columns

    Remember to mark this one as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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