+ Reply to Thread
Results 1 to 9 of 9

Returning a statement based on whether the values in one list can be found in another list

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Returning a statement based on whether the values in one list can be found in another list

    Hallo everybody

    I will try to do this as short and brief as possible.

    In sheet1 cell D26 I wanna have a statement that shows whether the values from list A (a data sheet only containing some ID's) can be found in list B or not (a sheet of "masterdata" containing all ID's)

    In short:

    I have some ID's in Sheet 2 column F and I have some ID's in sheet3 column A. What I wanna have is an equation in Sheet1 Cell D26 where I test whether or not the ID's in sheet2 column F is part of the masterdatafile containing the ID's (sheet3 column A). I wanna use a formula that returns some kind of statement/text string telling me, whether my IDs in sheet2 can actually be found in my masterdata Sheet3.

    I hope you have the information needed in order du help me out. Otherwise dont hesitate to write!

    Kind regards

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Returning a statement based on whether the values in one list can be found in another

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Do not try to use the Paperclip icon, as this does not work on this forum.

  3. #3
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Returning a statement based on whether the values in one list can be found in another

    Here is an example
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Returning a statement based on whether the values in one list can be found in another

    There is about 1000 ID's in my actual sheet2 and just about 2000 ID's in my sheet3

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Returning a statement based on whether the values in one list can be found in another

    A
    B
    25
    ID SHEET2 NOT IN SHEET3
    26
    ID's match?
    45
    27
    23
    28
    1234
    29
    3655
    30
    5678
    31
    6976
    32
    43565
    33
    758657


    Sheet 1


    B26=IFERROR(INDEX(Sheet2!$F$18:$F$1000,SMALL(IF(ISNA(MATCH(Sheet2!$F$18:$F$1000,Sheet3!$A$2:$A$2000,0)),IF(Sheet2!$F$18:$F$1000<>"",ROW(Sheet2!$F$18:$F$1000)-ROW(Sheet2!$F$18)+1)),ROWS(Sheet2!$F$18:Sheet2!F18))),"")

    Control+shift+enter

    copy across and down
    Last edited by CARACALLA; 11-26-2019 at 04:11 PM.

  6. #6
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Returning a statement based on whether the values in one list can be found in another

    CARACALLA

    Thank you very much.
    The thing is that, that equation does not meet my requirements. The equation, as I see it (so please correct me if I am wrong), generates a list in sheet1 containing all the ID's from list2 that does not appear in sheet3.

    What I want instead is just a simple statement in sheet1 Cell D26 that says something in the line of "Yes" or "no" if there is a match or if there is no match. That means that if just one ID in sheet2 is missing from sheet3, I want that statement. Not for each ID, but just one statement in Cell D26 in sheet1; kind of like a resume.

    Does it makes sense?

    I just wanna give the reader a quick overview of whether the list in sheet2 contains ID that is not represented in Sheet3.

    If you some other way this can be done, please let me know

  7. #7
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Returning a statement based on whether the values in one list can be found in another

    A
    B
    25
    ID SHEET2 NOT IN SHEET3
    26
    ID's match?
    8




    Sheet1


    B26=SUMPRODUCT((ISNA(MATCH(Sheet2!F18:F1000,Sheet3!A2:A2000,0)))*(Sheet2!F18:F1000<>""))

  8. #8
    Registered User
    Join Date
    09-16-2019
    Location
    Denmark
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Returning a statement based on whether the values in one list can be found in another

    Thank you. That worked wonderfully!

  9. #9
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Returning a statement based on whether the values in one list can be found in another

    You are welcome

+ 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. Replies: 6
    Last Post: 02-16-2018, 05:41 AM
  2. Replies: 1
    Last Post: 02-16-2018, 03:29 AM
  3. Replies: 1
    Last Post: 10-18-2016, 03:25 AM
  4. Replies: 2
    Last Post: 09-12-2015, 11:02 AM
  5. Check for values in a table and if found add value found in column to left to list
    By robhargreaves in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2013, 02:57 PM
  6. Returning multiple values based on list
    By JonoAllen in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2013, 08:47 AM
  7. [SOLVED] If statement from a list, returning from different list
    By shnolan in forum Excel General
    Replies: 2
    Last Post: 05-24-2012, 12:56 PM

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