Consulting

Results 1 to 9 of 9

Thread: Data validation with dependent dropdowns from a sorted list - seperate document?

  1. #1

    Data validation with dependent dropdowns from a sorted list - seperate document?

    Hello

    I am currently using this system for my data validation with dependent dropdowns from a sorted list:

    http://www.contextures.com/xlDataVal13.html

    As per the example above, the keywords used in the lists are in a seperate tab.

    I was wondering if anyone would know how I can put the keywords in a seperate document (for example, somewhere on the network) and still have this work ok?

    Attached is the document I use.

    Thank you very much.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Of course you could, but you would be adding quite a hefty overhead in having to open the keywords file, and reading it in.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thank you for your reply.

    We have a weird setup here so we need the keywords in a different document unfortunately.

    Am I right in thinking I can simply change (for example):

    =IF(C2="",RegionList,INDEX(RegionColumn,MATCH(C2,CustColumn,0)))

    to

    =IF(C2="",Z:\Keywords.xls:RegionList,INDEX(Z:\Keywords.xls:RegionColumn,MAT CH(C2,CustColumn,0))) or something like that?

    Thank you

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I would suggest you either have Keywords.xls open, in which case Z:\ would not be correct, or to open it, import the values and use the imported data.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    Thank you for your reply.

    Do you mean on my PC I will have two spreadsheets open:

    A. The spreadsheet which uses the keywords
    B. The spreadsheet with the keywords

    And it should work fine?

    How will spreadsheet A know to look in spreadsheet B?

    Sorry if I'm being stupid...

    Thanks

    Steve

  6. #6
    I have been thinking about this more. If I change the path of the keyword columns in the "Insert -> Name -> Define" section to the keywords spreadsheet on the network, would this do the trick?

    Thanks

  7. #7
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Create you formulae as usual with your server workbook open. Add code to open the server workbook when your main book is opened. Such as the following (placed in ThisWorkbook module)
    [VBA]
    Private Sub Workbook_Open()
    Dim wbSource As Workbook
    Dim wb As Workbook
    Set wb = ThisWorkbook
    Set wbSource = Workbooks.Open("C:\AAA\Book1.xls")
    wb.Activate
    End Sub

    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  8. #8
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Quote Originally Posted by MrSteve
    Do you mean on my PC I will have two spreadsheets open:
    You would have two Workbooks open.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  9. #9
    That worked perfectly.

    Thank you very much for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •