+ Reply to Thread
Results 1 to 5 of 5

Formula checking if a combination of cells exists in the range

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    3

    Formula checking if a combination of cells exists in the range

    Hello,

    I am trying to write a formula that checks if the cells in column A, B, and C of a row appear in the same combination in my range table.

    For example:


    Sheet 1, Row 4 has the following values for the cells in each of the columns below:
    Column A = First Floor
    Column B = Area A
    Clumn C = Activity 1

    I am looking for a formula that looks in Sheet 2 to determine if the combination of these 3 values appear in columns A, B, and C in the same row of the table. If this combination does occur I want the formula to output YES if the combination does not exist in the table output should be NO.

    Please let me know if you have any questions.

  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
    52,938

    Re: Formula checking if a combination of cells exists in the range

    Hi and welcome to the forum

    Without seeing what you are working with, this is just a guess, but try something like...

    =if(A1&B1&C1=sheet2!A1&sheet2!B1&sheet2!C1,"YES","NO")

    If that doesnt work for you, i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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-04-2012
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula checking if a combination of cells exists in the range

    Thank you for the help FDibbins,

    This formula is not quite what I am looking for... Please see the attached example spreadsheet.

    Thank you,

    Chris
    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
    52,938

    Re: Formula checking if a combination of cells exists in the range

    I tested my formula on your data and it works just fine. What were you expecting?

  5. #5
    Registered User
    Join Date
    12-04-2012
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Formula checking if a combination of cells exists in the range

    The problem is that it needs to search a range for the combination not just one row... For example row 23 on 'sheet 1' may contain the combination and forumla... I want the formula to see that row 3 on 'sheet 2' contains the same combination and return the yes -----OR----- I want the formula to see that the combination does not exist in rows 3 through 200 and return a NO.

    I tried to use ranges with your formula which gave me the formula below: (This formula is returning me NO on all rows even if they should be YES)

    =IF(A1&B1&C1='Sheet 2'!$A$3:$A$200&'Sheet 2'!$B$3:$B$200&'Sheet 2'!!$C$3:$C$200,"YES","NO")

+ 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