+ Reply to Thread
Results 1 to 13 of 13

Formula to reference a list and return yes/no

  1. #1
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Formula to reference a list and return yes/no

    I have a list locate on Sheet4. On Sheet1 & Sheet2, I want to insert a formula in column I that will reference the list on Sheet4, A1:A58, check for a match, and return a yes or no if there is a match. What formula would I use?

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Formula to reference a list and return yes/no

    You can test out something like this:

    =IF(MATCH(Sheet1!A1,Sheet4!A:A,0)>0,"Yes","No")
    Regards,
    Rudi

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to reference a list and return yes/no

    Hi,

    One way

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Sorry, forgot to mention, that it doesn't have to be an exact match. I'm matching to a list from another company, and our stuff is close but not exact. For example, they may have a position as Facilities Maintenance Engineer, and we just have it as Maintenance Engineer.

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Formula to reference a list and return yes/no

    That makes it very tough indeed. Where do you draw the line in determining what is a match or not. These LOOKUP formulas are best used with exact matches, using unique values like ID numbers or Emp. Codes etc. They do have a close match option, but this is actually intended for numbers...close matches higher than the lookup value or lower than the lookup value. When it comes to Text (close match)...there is no guarantee what will be matched. Is there no other common field that you can use, like a record ID or employee code or even combining two fields to create a custom lookup value?

  6. #6
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Hmm, let me think upon that. Perhaps I can modify it to match, and then use the formula.

    Thanks!

  7. #7
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Quote Originally Posted by RudiS View Post
    You can test out something like this:

    =IF(MATCH(Sheet1!A1,Sheet4!A:A,0)>0,"Yes","No")
    When I used this, it returned #N/A for positions I know have a match.

  8. #8
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    One way

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    When I used this one, it returned a No for positions I know are a match. So I switched the No/Yes. Then it returned a Yes for a position that isn't a match. So not sure what's happening.

  9. #9
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Formula to reference a list and return yes/no

    Would it be possible to upload a sample (desensitized) workbook with a portion of this list?
    It will make it easier to assist.

    N/A's can occur even if the formula syntax is correct, but no match is found due to leading/trailing spaces and other scenarios.

    TX.

  10. #10
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Here's it is... Test Match.xlsx

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to reference a list and return yes/no

    Hi

    It seems you were wanting to look up the sheet 1 column C values. You didn't specifically mention column C so I used the generally accepted default example value of A1 in my original.

    Even if you had used column C however it still would not have worked since your column C strings all have a trailing space character, i.e. "Beverage Steward ". It's always better with these sorts of things to make sure you have 'clean' data.

    Try

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which incorporates a TRIM() function to strip out the trailing space

    See also attached column E.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Formula to reference a list and return yes/no

    Quote Originally Posted by Richard Buttrey View Post
    Try

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which incorporates a TRIM() function to strip out the trailing space
    This works.

    Thanks!

  13. #13
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Formula to reference a list and return yes/no

    TX Richard. I went out for dinner.
    Glad you came right Jenn

+ 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. Formula to reference 2 cells and return 1 value?
    By amdaln in forum Excel General
    Replies: 4
    Last Post: 04-29-2010, 06:17 PM
  2. Formula to return a position reference
    By andrewc in forum Excel General
    Replies: 1
    Last Post: 11-19-2009, 07:03 AM
  3. Return the first cell reference from a named list
    By zinny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2008, 11:04 AM
  4. Return a Reference with the MIN() formula
    By cpadude in forum Excel General
    Replies: 1
    Last Post: 10-01-2007, 12:14 PM
  5. ADD A RETURN BUTTON WHEN GOING TO FORMULA REFERENCE LINKS
    By KJSacramento in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 11-08-2005, 12:15 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