+ Reply to Thread
Results 1 to 7 of 7

Comparing two sets of data in the same worksheet

  1. #1
    Registered User
    Join Date
    12-26-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Comparing two sets of data in the same worksheet

    I have an excel 2007 spreadsheet that has last month's data and this month's data.

    Last month's serial numbers are posted in Column A, this month's SNs are in Column X. Other columns contain names, addresses, etc... Serial numbers are unique by person.

    I've tried a couple of formulas, but don't seem to get any errors or answers -- the cell where formula is entered just shows the formula I typed in.

    Formulas I've tried so far:

    =ISNA(MATCH(A2,X2:X404,TRUE))

    =VLOOKUP(A2,A2:X404,24,FALSE)

    I feel like I must be missing something really obvious... Column A has data in rows 2-378, column X has data in rows 2-402.

    I'd like to know what's in column A that is NOT in column X and vice versa.

    Thanks for your help!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Comparing two sets of data in the same worksheet

    Hi and welcome ot the forum

    Try absoluting the ranges you have in your functions using $. If that doesnt work, try using the countif() function...
    =countif($X$2:$X$404,A2)....copied down

    Then reverse that for testing the other way
    =countif($A$2:$A$378,X2)

    An answer of 0 means no match found. You could wrap that into an IF statement to show "found" or "not found"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-26-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Comparing two sets of data in the same worksheet

    I tried absoluting the ranges using $, also tried the =countif function.

    Still not working... cells only show the formula as typed in. At this point I'd be happy if I even got an error message, but the formulas seem to be treated as just text.

    Really dumb question -- is there something I need to do to enable these forumlas??

    Or should cells be formatted any special way?

    Thanks!

    PS Getting frustrated because I could have done this manually by now, but I know this will come up again!

  4. #4
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Comparing two sets of data in the same worksheet

    Why dont you use match function
    =MATCH(A2,X:X,0)
    If you will get N/A error then there is no match. But if you will get any number then it matches
    Appreciate the help? CLICK *

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Comparing two sets of data in the same worksheet

    If it's showing the formulas, it sounds like the column is formatted as text.

    Select the column
    Go to Data Tab on ribbon> Text to columns
    Select "delimited" and make sure there are no lines showing column breaks and click "Finish"
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    12-26-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Comparing two sets of data in the same worksheet

    Thanks to all for the help!

    I had to reformat the columns as ChemistB suggested and also absolute the ranges in your functions using $.

    Now it works!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Comparing two sets of data in the same worksheet

    Happy to help and thanks for the feedback

+ 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. Comparing two sets of data
    By redrasta in forum Excel General
    Replies: 8
    Last Post: 02-16-2012, 08:56 AM
  2. Comparing two sets of data
    By indimonk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2011, 04:03 AM
  3. Comparing 2 Sets of Data
    By gregburbidge in forum Excel General
    Replies: 13
    Last Post: 11-02-2009, 08:12 PM
  4. Comparing two sets of data
    By LEEP2008 in forum Excel General
    Replies: 7
    Last Post: 10-08-2009, 03:38 PM
  5. Comparing two sets of data
    By sheargraphix in forum Excel General
    Replies: 2
    Last Post: 06-26-2007, 01:38 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