+ Reply to Thread
Results 1 to 13 of 13

Compare multiple cells to see if they match exactly

  1. #1
    Registered User
    Join Date
    11-30-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Compare multiple cells to see if they match exactly

    I'm comparing 12 cells on different sheets (in the same workbook) and need to determine if they are all an exact match to one another. Basically, I want something like exact(), but I need to compare more than two strings. Any ideas?

    Thanks!
    Last edited by redwine; 12-01-2010 at 12:42 AM.

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

    Re: Compare multiple cells to see if they match exactly

    You can use an AND() function to assemble the EXACT() functions... and overlap the checks.. if all return TRUE then the AND result will be TRUE and therefore all exactly alike

    e.g.

    =AND(EXACT(A1,B1),EXACT(B1,C1),EXACT(C1,D1),etc...)

    replace the references with the different sheet references to compare.
    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
    11-30-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare multiple cells to see if they match exactly

    Perfect, thanks!

  4. #4
    Registered User
    Join Date
    02-14-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    1

    Thumbs up Re: Compare multiple cells to see if they match exactly

    Quote Originally Posted by NBVC View Post
    You can use an AND() function to assemble the EXACT() functions... and overlap the checks.. if all return TRUE then the AND result will be TRUE and therefore all exactly alike

    e.g.

    =AND(EXACT(A1,B1),EXACT(B1,C1),EXACT(C1,D1),etc...)

    replace the references with the different sheet references to compare.
    Thanks that was right what I was looking for.

  5. #5
    Registered User
    Join Date
    12-10-2010
    Location
    California
    MS-Off Ver
    Excel all versions from 5.0 (1993) to 365
    Posts
    38

    Re: Compare multiple cells to see if they match exactly

    i suggest a more flexible, simpler method is:

    {=AND($A$1=$A$2:$A$12)}

    Explanation:

    A1=A2:A12

    - this will return an array (meaning a list) of booleans (True/False), indicating which cells match the first cell, and which don't

    AND
    - does the same thing as shown in previous answers-- if all items in the list are True (ie match the first cell), then your final output is True. If any items in the list are False (ie do not match the first cell), then your final output is False.

    {}
    - the curlies are not typed-- when you enter the formula, press CTRL-SHIFT-ENTER instead of just ENTER, so it gets treated as an array-formula. This is necessary for the AND part to work right.
    Last edited by johnywhy; 03-09-2016 at 01:03 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Compare multiple cells to see if they match exactly

    This thread was solved a long time ago; the OP hasn't logged on in over 5 years


    {also for any future readers, Control + Shift + Enter for array formulas}
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  7. #7
    Registered User
    Join Date
    12-10-2010
    Location
    California
    MS-Off Ver
    Excel all versions from 5.0 (1993) to 365
    Posts
    38
    This thread was solved a long time ago; the OP hasn't logged on in over 5 years


    {also for any future readers, Control + Shift + Enter for array formulas}
    I may be misunderstanding, but i thought the purpose of this forum is to provide useful info to future readers, not just the OP.

    This topic is still relevant. I found it while researching this topic. Office 2010 is still supported, and might still be the most widely installed version.

    Also, my solution is different than the others, so it gives people another useful option.

    http://www.techrepublic.com/blog/windows-and-office/poll-results-microsoft-office-2010-is-most-common-version/

    Thx for catching my typo
    Last edited by johnywhy; 03-09-2016 at 01:12 AM.

  8. #8
    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
    52,929

    Re: Compare multiple cells to see if they match exactly

    John, thanks for that input

    While speshul is correct that the thread is many years old and the OP may not have been back since then, all alternative answers are welcomed. I would point out that as long as you are applying that ARRAY to a smallish range, that is a good alternative. But if the range is large, excessive use of ARRAY formulas can start to slow your file down
    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

  9. #9
    Registered User
    Join Date
    08-24-2016
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    8

    Re: Compare multiple cells to see if they match exactly

    Can anyone help, when im trying to use your formula, it always shows a message saying



    "We found a problem with this formula. Try clicking Insert Function on the Formula tab to fix it, or click Help for more info on common formula problems.

    Not trying to type a formula?
    When the first character is an equal (=) or minus (-) sign, Excel thinks it's a formula...


    You type = 1+1, cell shows: 2


    To get around this, type an apostrophe (') first:
    you type : '=1+1, cell shows: = 1 +1

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Compare multiple cells to see if they match exactly

    dawn12789,Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

  11. #11
    Registered User
    Join Date
    08-24-2016
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    8

    Re: Compare multiple cells to see if they match exactly

    Thanks protonLeah,,,
    But my question is also related to this post, because im using the formula posted by the other member of this thread

  12. #12
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Compare multiple cells to see if they match exactly

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  13. #13
    Registered User
    Join Date
    08-24-2016
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    8

    Re: Compare multiple cells to see if they match exactly

    i already make a new thread here : http://www.excelforum.com/showthread...86#post4464686

+ 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