+ Reply to Thread
Results 1 to 4 of 4

How to search other sheets for matching values and return a specific value

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Bethesda, MD
    MS-Off Ver
    Excel 2007
    Posts
    10

    How to search other sheets for matching values and return a specific value

    Hello!

    Suppose I have 4 sheets in a workbook. I have a list of email addresses in the sheet titled "Email Master List". I would like to search all other sheets, titled "Learning Cohort 1", "Learning Cohort 2", and "Learning Cohort 3", for a specific email address. If the email address is found in any of those 3 sheets, I would like the sheet name to appear in a selected cell in "Email Master List".

    Is this possible? If the sheet name is not possible, could I at least have it return with a specific value (i.e. "yes" or "no")

    I appreciate your help!

    Mike

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to search other sheets for matching values and return a specific value

    Hi
    this macro lets you put a text string (eg an email address) into an input box and then searches for that string in the three specified sheets. If it finds the string it returns the name of the sheet where it was found in the active cell (in your example, I assume this will be in the master list sheet). Is that what you want? it will only return one sheet name if the address is on more than one sheet, and does not check to see if you are running the macro from the master sheet, but could easily be tweaked to do that if you like.


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-08-2019
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    96

    Re: How to search other sheets for matching values and return a specific value

    see attached formula solution

    This involves creating a Named Range for the three Cohort spreadsheets - see new separate sheet named Cohort Names (see Name Manager in the Formulas tab for the what the range looks like and how to edit it to go into your workbook)

    The Named Range then treats all the spreadsheets included under the Named Range as one - and an "array formula" is then used to search the range

    The MATCH formula returns the sheet number (in the order of your sheet names in the new Corhort Names worksheet) of the Named Range your match is on - and then the CHOOSE function follows with the the 3 names of your worksheets. So, the Match formula result is either 1, 2 or 3 in this case and the choose function allows us to enter your sheet names to display according to the number in Match returns.

    An array formula requires that you press CONTROL-SHIFT-ENTER rather than just "enter" when you have finished creating the formula otherwise you will get a @N/a response if you just clicked enter. You know you have done an array formula correcty if you see curly brackets {} once you press C+S+E
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: How to search other sheets for matching values and return a specific value

    Here is another solution for you

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 04-15-2021 at 12:39 PM. Reason: Add file

+ 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: 5
    Last Post: 07-13-2018, 08:49 AM
  2. [SOLVED] Search for values, copy matching rows to existing sheet in a specific place?
    By sordosxls in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-12-2016, 06:27 PM
  3. Replies: 4
    Last Post: 10-01-2015, 11:01 AM
  4. Replies: 2
    Last Post: 06-24-2015, 09:08 AM
  5. [SOLVED] Formula to match data in different sheets ( multi column) and return matching values
    By kangyao in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2013, 07:38 PM
  6. search multiple sheets for specific date, return data in cell to r
    By NonIllegitimiCarborundum in forum Excel General
    Replies: 0
    Last Post: 04-28-2006, 04:10 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