+ Reply to Thread
Results 1 to 11 of 11

Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show information

  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    34

    Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show information

    Hi All!

    I am having a lot of problems with a spreadsheet I am trying to create. I am attempting to do a LOOKUP for a phrase in cell A1 (have a drop down of 30 location names).

    After the user pulls down their location name, I want it to "pull" information from one of the 30 worksheets that has that specific location information.

    For instance:

    User pulls down "Texas" location -> function searches for "Texas" in 30 workbooks. Identifies the workbook that has "Texas" in it, then displays the employees and their information on the main page.

    The columns in each of the 30 workbooks are static, they contain sales objectives.. The rows are variable, each location has varying number of employees.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    Have a look here: http://www.xl-central.com/lookup-sin...le-sheets.html
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    Those locations are the sheet names, right? Wouldn't it be better to auto-direct the user to the worksheet (with a macro)?
    When I say semicolon, u say comma!

  4. #4
    Registered User
    Join Date
    08-09-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    The locations could be manually made for the sheet name, the data source populates the location name in cell A1 for every worksheet.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    If the sheetname is Texas, and you want to go to that sheet and pull the info, then yes, you can simply refer to the sheet using the INDIRECT function.... not necessarily needing a macro.

  6. #6
    Registered User
    Join Date
    08-09-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    Quote Originally Posted by NBVC View Post
    If the sheetname is Texas, and you want to go to that sheet and pull the info, then yes, you can simply refer to the sheet using the INDIRECT function.... not necessarily needing a macro.
    So, if the sheet names were the same as the 30 locations in the drop down, when you pulled down one of the locations, the INDIRECT function would validate one of the 30 sheets with the name of the location in the drop down?

    One issue I am foreseeing from the link you sent, is that each location has a variable # of employees. Anywhere from 5-40. So I can't set it to look in a specific # of rows. Ideally it would copy and paste the rows which have the employee names, and then their sales performance under each column header.. which are static.

  7. #7
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    If you just refer to all the cells, the empty ones will be shown as 0. But this is of course preventable with a simple IF function (=IF(B1="";"";B1)

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    With the link I gave you you can use whole column references, or at least range sizes that would at least contain all the data in the largest sheet's database

  9. #9
    Registered User
    Join Date
    08-09-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    Quote Originally Posted by NBVC View Post
    If the sheetname is Texas, and you want to go to that sheet and pull the info, then yes, you can simply refer to the sheet using the INDIRECT function.... not necessarily needing a macro.
    I am sorry for what may be a dumb question, but looking up the INDIRECT macro I did not see where it could reference an entire workbook by name. I also don't quite grasp how to choose the rows following that.

    One thing that every workbook does have is this:

    "TOTAL"
    -employee
    -employee
    "SUMMARY"

    Would it be possible to use an INDIRECT function that tells the worksheet to grab all data from rows between "TOTAL" and "SUMMARY"?

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    please post a sample workbook with sample data and expected results...

  11. #11
    Registered User
    Join Date
    08-09-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Help With Formula to Search 30+ Worksheets to match Info in Cell A1, then show informa

    example2.xlsxHere is an attached example. With a front page, that changes based on the selection in A1. Data pulled on LOCATION tab in top section, and then location specific information from worksheets 3-33 (only one worksheet created in this example for location).
    Last edited by gregpl; 08-12-2013 at 12:08 PM.

+ 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: 11
    Last Post: 11-30-2012, 08:04 PM
  2. Replies: 0
    Last Post: 09-04-2011, 09:14 AM
  3. Replies: 1
    Last Post: 08-12-2010, 04:36 PM
  4. Show info in Column C, if A & B match criteria
    By PowerSchoolDude in forum Excel General
    Replies: 4
    Last Post: 08-21-2009, 03:02 PM
  5. Replies: 10
    Last Post: 02-21-2005, 03: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