Results 1 to 3 of 3

Dashboard for dynamic list

Threaded View

  1. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Dashboard for dynamic list

    In the attached:

    Dynamic Named Ranges were created for the list of providers and the database of information.

    On Sheet2:
    Data Validation List option is used to provide selection list of activities

    Upon selection of the activity, Advanced Filter is automated using VBA to return the matching providers for that activity. See attached.

    Code for worksheet module:
    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        
        If Not Intersect(Target, Range("B5")) Is Nothing Then
            Get_Providers
        End If
    
    End Sub
    Code to run Advanced Filter
    Option Explicit
    
    Sub Get_Providers()
    
        Dim i As Long
        
        Application.ScreenUpdating = False
        
        Sheet2.Range("B10").CurrentRegion.ClearContents
    
        Sheet1.Range("Providers").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
            Sheet2.Range("B1:B2"), CopyToRange:=Sheet2.Range("A10"), Unique:=False
            
        i = Sheet2.Cells(10, Columns.Count).End(xlToLeft).Column
        
        Sheet2.Range(Cells(1, 7), Cells(1, i)).EntireColumn.Delete
            
        Application.ScreenUpdating = True
        
    End Sub
    Attached Files Attached Files
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this 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