+ Reply to Thread
Results 1 to 6 of 6

How to create dependent lists from database data

  1. #1
    Registered User
    Join Date
    05-27-2008
    Posts
    3

    How to create dependent lists from database data

    Hi,

    I imported data from an external database using a database query. I imported data into two worksheets. One has the project data (project number, name, IDnumber as colums) the other has the extension number information (extension number, name, client, IDnumber as colums).

    I would like to create two validation lists (list1=projects, list2=extension numbers). First i would select the project from a list (no problem). Next i would like to select the appropriate extension number that belongs to the project i selected in list1.

    HOW do i filter list2 content based on the first selection? If a extension number belongs to a project it has the same IDnumber as the project. How do i compare these and filter the list?

    One extension number can belong only to one project. But a project can have numerous extension numbers.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi and welcome to the forum,

    I don't think you need to filter list 2, Just use a VLOOKUP() function. On list 2 first move the ID number from the 5th column and make it the first column. Now name the whole of list 2 "List2"

    With your Project ID numbers from List 1 starting in say column A2, in B2 enter
    Please Login or Register  to view this content.
    and copy this down.

    HTH

  3. #3
    Registered User
    Join Date
    05-27-2008
    Posts
    3

    Owner Child Validation lists?

    Thank's,

    what a quick reply to problem! Unfortunately I don't understand how using the Vlookup function would help me in my problem. Yes I can easily find one matching extension number to every project, but this doesn't help since every project has always the extension number 1. A typical situation is that on project has 1-10 extension number, some projects have hundreds.

    I'm making a form like document, where the user has to select:
    1) a active project
    2) a extention number that belongs to the project selected

    I have thousands of extension numbers so i have to somehow filter that list (comes from a database) by letting the user first select the project.

    Any ideas? Using functions? VBA?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    Are you trying to list lots of extension numbers for a selected project number? If the ID number is the common key then surely you just need to use that on list 2 to grab the project number from list 1 with a VLOOKUP()

    Can you attach the workbook so that we can see the problem in context?

    Regards

  5. #5
    Registered User
    Join Date
    05-27-2008
    Posts
    3

    How to create dependent lists from database data

    Yes, probably what you say is true. I just can't figure out how I can actually do that.

    How can I use the first selection from the drop down list (projects) as a search criteria for the extension numbers? And how do I then create a second drop down list (using validations) to show all the extension numbers that have the same ID as the selected project?

    Well hopefully the workbook will explain more what I'm going after... Probably a really easy thing to do, im just not fimiliar with Excel functions or VBA.
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    I think the following web site will give you the answer.

    http://www.contextures.com/xlDataVal02.html
    Rgds

+ 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