+ Reply to Thread
Results 1 to 5 of 5

Return Cell Contents by Sheet Name Search

  1. #1
    Registered User
    Join Date
    02-21-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    6

    Return Cell Contents by Sheet Name Search

    Hello all.

    I've run into another slight holdup with my restaurant work. I am setting up a sheet to use for menu costing and I need the contents of a cell to be copied in based on a name match from SHEET names.

    I know how to do this with VLookup when the names are all gathered in one worksheet, but I don't know how to use this when the names are sheet names within a workbook.

    To clarify..

    On sheet 1 I enter Apple Sauce into A4. In that same workbook there is a sheet named Apple Sauce (along with maybe a hundred other randomly named sheets.) I want the content of, say, B1 from the Apple Sauce sheet to automatically plug in to sheet 1 B4 when I type Apple Sauce in A4 of sheet 1.

    I've used this equation.. =VLOOKUP(A7,[InventoryMain.xlsx]Sheet1!$A$1:$H$1000,8,FALSE).. to accomplish this via a search of a single table on a single sheet. I just don't know how to make it search via the names of sheets in one workbook rather than via a table.

    Thanks for any help!

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Return Cell Contents by Sheet Name Search

    you will need to use indirect in your formula in cell B4 of sheet 1 use:

    =INDIRECT("'"&A4&"'!B1")
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    02-21-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Return Cell Contents by Sheet Name Search

    That's perfect. Thank you!!!

  4. #4
    Registered User
    Join Date
    02-21-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Return Cell Contents by Sheet Name Search

    How would I do this to do the exact same thing except look through the sheets on a seperate workbook? Say the workbook name is Test. I can't figure out where to enter it into the formula to make it work.

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Return Cell Contents by Sheet Name Search

    as long as you have the other workbook open you can use the following, but with indirect it will not reference a closed workbook.

    you will just need to update the file name and location.

    =INDIRECT("'C:\Documents and Settings\DGagnon\Desktop\[Test.xlsx]"&A4&"'!B1")

+ 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