+ Reply to Thread
Results 1 to 11 of 11

Linking Drop Down Lists across Worksheets

  1. #1
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10

    Linking Drop Down Lists across Worksheets

    Using Office 2003.

    I have created two workbooks, one which is a master price list (MasterPriceList.xls) and another which is a pricing sheet template that will be used to calculate many different products (Pricing.xls)

    I have used a VLOOKUP across the workbooks (thanks to those who helped me with that) but I cannot get a drop list to work across two worksheets. When I enter the source in the "refers to" box, I get a notice saying that you can't use data validation across two workbooks. However, this was the same error message I got when I was incorrectly inserting the reference source for the VLOOKUP function, so I don't believe it Also, there are several tutorials on the web that say this can be done. However, none of them seem to work for me.

    I cannot open the Data Validation box and get to the other open worksheet, so I can highlight the area I want, with the range I want to drop down. Until I close the data validation box, I cannot get out of that sheet. I have used cell ranges as well as named ranges.

    When I type in a name, I get only the text I entered in the source reference box appearing on the sheet, i.e., the drop down box will only show "=C:\Documents And Settings\Allen\My Documents, etc" it doesn't seem to recognize it as a source.

    Any ideas? I thank you in advance for your suggestions and guidelines.

    Allen
    Last edited by ajfreed; 01-22-2009 at 03:05 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Try the technique explained here. This site hasn't failed me yet:

    http://www.contextures.com/xlDataVal05.html
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10
    Many thanks. I'll check it out and let you know if my feeble mind can grasp the concept!

    -a

  4. #4
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10
    I tried following the instructions on that site (http://www.contextures.com/xlDataVal05.html) exactly. Actually, I had looked at that site before.

    When I try and create the drop down list, using the exact same names and sheets as in the example, I get an erroe message saying that "The source currently evaluates to an error. Do you wish to continue?"

    I am reproducing the example (I think) exactly. If I say "Continue" the drop down cells are blank.

    I am mystified.

    Thanks again for any help.

    Allen

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Well, the big warning at the top might be an indicator:

    "For data validation to work, the workbook which contains the list must be open, in the same instance of Excel. You could create the list in a workbook that is always open, but hidden, such as the Personal.xls workbook."

    This is the reason I never do this. VLOOKUP is perfectly suited to do what you want and doesn't require all the gymnastics. PLUS, it works with closed workbooks.

  6. #6
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10
    I did have both workbooks open. However I agree, the VLOOKUP works fine, I was just looking for an easier way for our users to input a value, rather than looking up a code. i.e., rather than typing "PART123" in a cell to get the result from VLOOKUP, they would choose from a drop down list to populate the cell, to avoid the possibility of a typo.

    I am still wondering why it did not work but, if in fact the sheet must be open, you are right, it's probably best to stick w/ VLOOKUP.

    Thanks,
    Allen

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    You don't have to give up on the drop list, you just need to form that list from inside the workbook.

    There are some hightech solutions for getting the column of part #s from the second workbook to duplicate in first workbook, but the simplest is:

    1. Bring over the part numbers into an extra sheet on your current workbook (Sheet3).
    In the first cell on the trash sheet, enter a formula like this:
    =IF([Book2.xls]Sheet1!A1<>0,[Book2.xls]Sheet1!A1,0)
    ...and copy that down far enough to get your whole list. Don't worry about the zeros at the bottom, that just leaves room for the list to grow on its own.

    2. Create a Dynamic Name range from these number that exclude the zeros automatically
    Insert > Name > Define
    Names in Workbook: PartsList
    Refers to: =INDEX(Sheet3!$A:$A, 1):INDEX(Sheet3!$A:$A, COUNTIF(Sheet3!$A:$A,">"""))

    3. Then set up your validation list =PartsList

  8. #8
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10
    You are a mind reader and a genius. Many thanks, I was able to get your first solution working with a slight modification that I discovered on my own as the site was down for repairs.. However, I am having trouble, perhaps with the syntax, on the second suggestion and I really would like to get rid of the zeros. I don't understand, where in the formula, you name the range (if you in fact do). When I follow that procedure, I get a VALUE response.

    I need a dynamic range, we are constantly adding and subtracting from our master price list.

    BTW, I see you are a rocket scientist. Can I add a signature to my posts "Yes, in fact I am a food scientist"? I can calculate bioavailability values, and I know what makes a great hamburger, but I admit to being out of my league when pure mathematics and logic is involved.

    Thanks again for your help, it is appreciated.

    Allen

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    I don't read anything in your post that I didn't cover above. Step #2 shows you the formula needed to make your PartsList named range dynamic. It will only show the values above 0 from the range, I promise.

    The garbage sheet itself should have enough extra cells in the copy range (Step #1 above) to handle your expansion, and as a result the cross-sheet references WILL result in zeros at the bottom. Don't fret it, it's a garbage sheet, right? You can even hide that sheet so no one even gets to see it and complain.

    As for your signature, click on the USER CP link at the top of any page, then click on Edit Signature on the left side-panel.

  10. #10
    Registered User
    Join Date
    01-20-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    10
    Once more, so many thanks for your help, this worked perfectly.
    And, as usual, the problem I had was caused by user error ... I was thinking there were two options, not two steps! I think my brain was over-heated when I read your post, just burned out from looking at tiny cells all day.

    Problem solved!

    This is a great site, and I truly appreciate your time and effort.

    Allen

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Very glad you got it worked out.

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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