+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    01-26-2010
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    15

    Question Compare and show only the same value cells as result?

    Hi,

    I am new to Excel 2007 and this forum!

    I have a large spreadsheet (65,000+ rows) that contains data pulled from a database. Each row in the spreadsheet corresponds to a record in the database.

    I need to compare 2 "fields" from the database, which means each row is a separate comparison. To complicate things further, each field can be multi-value, so there are multiple cells (12) per field, per row.

    The fields are mutually exclusive. What I need to do is check if the value in A1 is found in M1:X1 and indicate it if it is. Then B1 in same M1:X1, etc., for a1 thru L1.

    Then I need to do the same thing for each of the 65,000+ rows.

    I have no idea what to even search on to try to find ideas. Any guidance will be greatly appreciated!
    Last edited by NBVC; 02-23-2010 at 01:47 PM. Reason: Per OP Request via PM

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,163

    Re: Compare and show only the same value cells as result?

    You can try:

    =SUMPRODUCT(--ISNUMBER(MATCH(M1:X1,A1:N1,0)))

    this will count how many times values in M1:X1are found in A1:N1
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,228

    Re: Compare and show only the same value cells as result?

    If A1 exists in M1:X1, indicate so where? And what is the indicator value? "Yes"?
    If B1 exists in M1:X1, indicate so where? And what is the indicator value? "Yes"?

    Etc.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    01-26-2010
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Compare and show only the same value cells as result?

    Quote Originally Posted by JBeaucaire View Post
    If A1 exists in M1:X1, indicate so where? And what is the indicator value? "Yes"?
    If B1 exists in M1:X1, indicate so where? And what is the indicator value? "Yes"?

    Etc.
    Indicate in the easiest way possible. Maybe highlight/shade the cells that are duplicates?

    Probably would be best to not add a "results" cell(s), since there is enough data in the row already!

  5. #5
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,163

    Re: Compare and show only the same value cells as result?

    To highlight select columns A:N

    Go to Format|Conditional Formatting|New Rule

    Select Use Formula to determine which cells to format

    Enter formula

    =Match(A1,$M1:$X1,0)

    Click Format and choose colour from Pattern tab.

    Click Ok.

    Click Ok to apply.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0