Results 1 to 4 of 4
  1. #1
    jill27 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    2

    Exclamation Locate match in two columns

    Hello,



    I am trying to locate multiple matches between a range of two columns. I do not know SQL at all so I am having a hard time figuring this out. I am comparing two separate systems of records to make sure we are recording the same information and if we're not we need to reconcile it.

    Example:

    Column A Column B
    aaa123 bbb123
    aaa124 ccc234
    aaa125 aaa123
    aaa126 aaa123
    aaa123 bbb124
    bbb124 aaa125

    I need to know when each cell matches or does not match across Column A and Column B.

    Thanks!
    Jill

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Just add that table to a Query in Access, add those two fields, and then create a Calculated expression like this:

    Code:
    MatchCheck: IIF([Column A]=[Column B],"Match","Does Not Match")
    If you are not familiar with creating Calculated Fields (Expressions) in Access, take a look at the internal help files.

  3. #3
    jill27 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    2
    Thanks! And that will search the entire column or just the two cells in the same row?



    Quote Originally Posted by JoeM View Post
    Just add that table to a Query in Access, add those two fields, and then create a Calculated expression like this:

    Code:
    MatchCheck: IIF([Column A]=[Column B],"Match","Does Not Match")
    If you are not familiar with creating Calculated Fields (Expressions) in Access, take a look at the internal help files.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Same record.

    If you want it to search the whole column (meaning there is no correlation between column A and column B on the same record), then they should really not be in the same table. Each column should be a separate table, and then you can do a Match or Unmatched query between the two tables.

    In Relational Databases like Access, every field in a record should have some relationship. For example, if I had an employee listing, I may have First Name, Last Name, Address,, and Phone Number. For each record, all of those details would pertain to the same person. You wouldn't have a single record where you have the First Name of a person, but then the Last Name on the same record be for someone else entirely.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Can not locate values in recordset
    By lawdy in forum Programming
    Replies: 8
    Last Post: 02-01-2013, 11:18 PM
  2. Replies: 1
    Last Post: 06-22-2012, 03:33 PM
  3. Replies: 16
    Last Post: 03-13-2012, 03:47 PM
  4. Cannot locate VBA code for MsgBox!
    By sjl in forum Forms
    Replies: 5
    Last Post: 12-20-2011, 05:26 PM
  5. Open form and locate it on the bottom
    By Dominaz in forum Forms
    Replies: 4
    Last Post: 11-17-2011, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums