+ Reply to Thread
Results 1 to 2 of 2

Drop down menu that can pull data for 1 person at a time from Table?? (Even possible)

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2014
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    36

    Drop down menu that can pull data for 1 person at a time from Table?? (Even possible)

    Figured it out
    Attached Files Attached Files
    Last edited by JCarollo765; 04-29-2014 at 02:40 PM.

  2. #2
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Drop down menu that can pull data for 1 person at a time from Table?? (Even possible)

    Change cell A6 in the attached Dropdown sheet.

    **Even if you figured it out, its useful to keep the question up for other people's knowledge**

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("A6")) Is Nothing Then
    
        Dim k       As Integer  'Dropdown columns...
        Dim amt     As Long     'Amount of premium...
        Dim n1      As String   'Name of person...
        Dim cell    As Range    'Cell in rng...
        Dim rng     As Range    'Range of people to loop through on Sheet1...
        
        n1 = [A6]
        k = 2
        Set rng = Sheet1.Range("A3:A1000")
        
        Range("B5:Z6").ClearContents    'Clear prior data...
        
        For Each cell In rng
            If n1 = cell.Value Then
                
                For i = 3 To 20     'Number of columns in Sheet1...
                    amt = Sheet1.Cells(cell.Row, i).Value
                    
                    If amt > 0 Then     'If greater than ZERO... print out
                        Cells(5, k).Value = Sheet1.Cells(1, i).Value            'Name of premium...
                        Cells(6, k).Value = Sheet1.Cells(cell.Row, i).Value     'Value...
                        k = k + 1
                    End If
                Next i
                
                
            End If
        Next cell
    
    End If
    
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. drop down menu and time
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2013, 11:31 AM
  2. Replies: 3
    Last Post: 01-08-2013, 02:08 PM
  3. Use of data from drop down menu and date ranges for pivot table
    By ChristaNeedsHelp in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-25-2012, 05:50 PM
  4. Replies: 5
    Last Post: 06-25-2012, 09:16 AM
  5. Replies: 0
    Last Post: 09-01-2011, 12:07 PM

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