Results 1 to 10 of 10

Double filter or lookup and filter

Threaded View

  1. #1
    Registered User
    Join Date
    08-04-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003,2007
    Posts
    30

    Double filter or lookup and filter

    This is hard for me to explain to me let alone to you, so good luck and thanks in advance for considering solutions.

    I'm using Excel 2007.
    This question is not quite code based, I'm more looking for ideas on what direction I should try to go with the code, focussing on efficiency.

    From an SQL Query I get a table like this showing me who the owners are of my CMDB items:

    Config_Item	Environment	Class	CI_Type		Responsibility	Contact
    ACCT		Production	Software	Application	Business Owner	Angus Boneparte
    ACCT		Production	Software	Application	Business Owner	Paul McCarthy
    ACCT		Production	Software	Application	System Owner	Robert Freelove
    ACCT DEV		Development	Software	Application	System Owner	Billy Kee
    ACCT DEV		Development	Software	Application	Business Owner	Edward Teach
    ACCT TEST		Testing		Software	Application	System Owner	Billy Kee
    ACCT TEST		Testing		Software	Application	Business Owner	Edward Teach
    ACCT UAT		UAT		Software	Application	System Owner	Billy Kee
    ACCT UAT		UAT		Software	Application	Business Owner	Miriam Jones

    I want to select a name via drop down list and display all owners of all items of which the selected person is an owner.
    eg. If I select "Edward Teach" it will lookup all items linked to Edward and display all rows for those items and I would get this result:

    Config_Item	Environment	Class	CI_Type		Responsibility	Contact
    ACCT DEV		Development	Software	Application	System Owner	Billy Kee
    ACCT DEV		Development	Software	Application	Business Owner	Edward Teach
    ACCT TEST		Testing		Software	Application	System Owner	Billy Kee
    ACCT TEST		Testing		Software	Application	Business Owner	Edward Teach

    I'll have 1 button to run the SQL Query and import the data. (I have already written the code for that). After that I don't want the spreadsheet constantly looking at the database, I want it to only use what has already been imported.

    I will probably add to the data import script the creation of an alphabetized list of a unique names on a seperate worksheet to use for the Drop Down list. That should be easy enough.

    But I need ideas on how to go about this double filter.

    Here is my current concept. Can you offer a more efficent method for me?

    Upon selecting a name it could run some sort of lookup and physically create/replace a table showing all Config_Items associated with the name. Then it could use the data from that table to do a standard multi entry autofilter.

    I've not previously tried initiating a macro from a drop down selection. I think I can or perhaps I'll need to add a [Search] button that will actually run it.
    Last edited by Opy; 03-16-2011 at 01:02 AM.

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