+ Reply to Thread
Results 1 to 6 of 6

Compare 2 columns to a 3rd column function needed

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Asheville, NC
    MS-Off Ver
    MS Office 2011 for Mac
    Posts
    8

    Question Compare 2 columns to a 3rd column function needed

    I need a function that does the following: (SEE ATTACHED SAMPLE WORKBOOK)

    Sheet 1'Email' Column A(A2:A1000) Column B(B2:B1000) compared to Sheet 2 Column C(C2:C1000) Column D (text value added; value will be either Match or No Match)


    Sheet 1 is named Email, Sheet 2 doesn't have a name

    Sheet 1 'email' columns searched
    In the Sheet 1'email' sheet, there is Column A that has email addresses in each cell (one email address in each cell)
    In the Sheet 1'email' sheet, there is Column B that has email addresses in each cell (one email address in each cell)

    Sheet 2 column searched
    In the Sheet 2 sheet, there is Column C that has email addresses in each cell (one email address in each cell)
    Sheet 2 text value added
    Column D has a text value of either Match or No Match

    I need to compare the email address that is in Sheet 2 Column C cells C2 to C1000 to both the Sheet 1'email' Columns A and B
    and see if the email address that is in Sheet 2 C2 is ANYWHERE in either Sheet1'email' Column A A2:A1000 and/or Column B B2:B1000

    If the email address in Sheet 2 Column C cell C2 is found in either Sheet 1'email' Column A cells A2:A1000 and/or Sheet 1'email' Column B cells B2:B1000,
    I want to put the value Match in the blank cell D2 in Column D of Sheet 2. If there is not a match found, then the value No Match will go in Sheet 2
    Column D cell D2. This will be the pattern to check all values in Sheet 2 Column C: if a match from Sheet1'email' Column A and/or Column B is found for
    Sheet 2 Column C cells C2:C1000, then put the text value Match or No match in Sheet 2 Column D cells D2:D1000.

    I know that I am probably being too **** with my explanation. I just wanted to make sure that you know what I'm saying and what I want the function to do.

    Thank you very much,
    Jason
    Attached Files Attached Files
    Last edited by Jason_McCoy; 10-23-2012 at 11:36 PM. Reason: To attach a sample Workbook

  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,044

    Re: Compare 2 columns to a 3rd column function needed

    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, what your expected outcome is, and how you arrived at that

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    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
    10-23-2012
    Location
    Asheville, NC
    MS-Off Ver
    MS Office 2011 for Mac
    Posts
    8

    Re: Compare 2 columns to a 3rd column function needed

    Here is an example Workbook that will show you what I want the function to do.
    Attached Files Attached Files

  4. #4
    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,044

    Re: Compare 2 columns to a 3rd column function needed

    see if this gives you what you need?

    =IF(COUNTIFS(Email!$A$2:$A$20,A2)+COUNTIFS(Email!$B$2:$B$20,A2)=0,"No Match","Match")

  5. #5
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Compare 2 columns to a 3rd column function needed

    Quote Originally Posted by FDibbins View Post
    see if this gives you what you need?

    =IF(COUNTIFS(Email!$A$2:$A$20,A2)+COUNTIFS(Email!$B$2:$B$20,A2)=0,"No Match","Match")
    Shorter version:

    =IF(COUNTIF(Email!A:B,A2),"Match","No Match")

  6. #6
    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,044

    Re: Compare 2 columns to a 3rd column function needed

    nice 1 mama i have nooo idea why i even used sumifS() though lol

+ Reply to Thread

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.6.0 RC 1