+ Reply to Thread
Results 1 to 6 of 6

How to tell if row with identical criteria exists in different spreadsheet

  1. #1
    Registered User
    Join Date
    08-19-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    85

    How to tell if row with identical criteria exists in different spreadsheet

    Can someone help me write a formula that does the following?

    SS1= spreadsheet 1
    SS2= spreadsheet 2
    Cn= column
    x=Column

    If data in SS1,CnC = data in SS2,CnB

    and

    if data in SS1,CnD = data in SS2,CnC

    and

    if data in SS1,CnE = data in SS2,CnD

    and

    if data in SS1,CnG = data in SS2,CnH

    then return "Yes" in the cell

    Thank you!
    Mattman123

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: How to tell if row with identical criteria exists in different spreadsheet

    Are the two files open at the same time?

    Should column G and column H be the other way round for your final test?

    Pete

  3. #3
    Registered User
    Join Date
    08-19-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: How to tell if row with identical criteria exists in different spreadsheet

    The two files are open at the same time. The columns indicated in the final test are accurate as is. I can move data to a different column if it would simply the function, although that's not preferable.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: How to tell if row with identical criteria exists in different spreadsheet

    No, don't move the columns - it just seemed more consistent to me if they were the other way round.

    If the two files are both open then you don't need to concern yourself with the path - Excel will put it in for you. Assuming both files have an .xlsx extension, and that the data is on Sheet1 in both files, then you can do this:

    =IF('[SS1.xlsx]Sheet1'!C2&'[SS1.xlsx]Sheet1'!D2&'[SS1.xlsx]Sheet1'!E2&'[SS1.xlsx]Sheet1'!G2='[SS2.xlsx]Sheet1'!B2&'[SS2.xlsx]Sheet1'!C2&'[SS2.xlsx]Sheet1'!D2&'[SS2.xlsx]Sheet1'!H2,"yes","no")

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    08-19-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: How to tell if row with identical criteria exists in different spreadsheet

    Pete,

    Major complication: The rows will not correspond from SS1 to SS2 like you have there. One row could be 23 while the other is 89.

    Also, data within each column repeats many times, so you can't create a unique identifier without all four fields.

    Each of the conditional tests will need to be separate. Does that make sense?

    Is there a way to do this with like INDEX MATCH?

    Thank you!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: How to tell if row with identical criteria exists in different spreadsheet

    Notice that I was concatenating the 4 values together, so they had to be identical on both sheets to generate a match.

    I suggest you do the same thing in both files, so in SS1 (let's say in column X) put this formula in X2:

    =C2&D2&E2&G2

    and copy down to cover all your data. Then put this formula in X2 of SS2:

    =B2&C2&D2&H2

    and copy down. Then you could use this in Y2 (assuming the formula is in SS1 Sheet1, then we don't need to specify those file and sheet names):

    =IF(ISNA(MATCH(X2,'[SS2.xlsx]Sheet1'!X:X,0)),"no","yes")

    then copy this down.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How do you List unique names when the criteria is identical
    By john dalton in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-10-2013, 09:40 AM
  2. Replies: 1
    Last Post: 09-11-2012, 05:43 PM
  3. formula to return value from string of text if certain criteria exists
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-29-2012, 02:19 AM
  4. Replies: 1
    Last Post: 11-18-2010, 09:49 PM
  5. [SOLVED] How to test if an Excel spreadsheet exists in VBScript?
    By JP in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-20-2005, 12:06 PM

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