Results 1 to 4 of 4

Populate list box with filtered data

Threaded View

SDdeRuiter Populate list box with... 05-16-2017, 06:34 AM
jindon Re: Populate list box with... 05-16-2017, 06:52 AM
SDdeRuiter Re: Populate list box with... 05-16-2017, 07:07 AM
jindon Re: Populate list box with... 05-16-2017, 07:17 AM
  1. #1
    Registered User
    Join Date
    05-16-2017
    Location
    NL
    MS-Off Ver
    2013
    Posts
    3

    Populate list box with filtered data

    Hello,

    For a print form I'm trying to populate a Listbox with data filtered from a single sheet
    I've managed to do so for a single column. All empty cells are ignored and only populated celss are used.
    How can i use from the same rows the data in anothe column?

    I would like the listbox in the most ideal situation populated from the last 15 results of column R and column T

    The code so far I have is:

    Dim i As Long, vArray() As Variant, ArrCount As Long
    ArrCount = 0 'offset vanaf boven
    ReDim vArray(ArrCount)
    With Sheets("Gen1_Schema")
    
        For i = 18 To .Range("R65536").End(xlUp).Row
                If .Cells(i, 18) <> "" Then
                ReDim Preserve vArray(ArrCount)
                vArray(ArrCount) = .Cells(i, 18)
                'vArray(ArrCount, 1) = .Cells(i, 18)
                'vArray(ArrCount, 2) = .Cells(i, 20)
                ArrCount = ArrCount + 1
            
            
            End If
                 Next i
        
          End With
    Cat1_Rapportage.ListBox1.List = vArray
    
    Me.ListBox1.Selected(Me.ListBox1.ListCount - 1) = True
    Me.ListBox1.Selected(Me.ListBox1.ListCount - 1) = False
    Last edited by SDdeRuiter; 05-16-2017 at 07:02 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula To Populate Filtered Data From Another Tab
    By robertguy in forum Excel General
    Replies: 6
    Last Post: 12-14-2015, 05:32 AM
  2. populate list box with filtered value
    By 9599lorenzo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2015, 05:16 AM
  3. Populate a textbox on Userform with data from a filtered range using VBA
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2014, 04:20 AM
  4. [SOLVED] populate userform with filtered data
    By crossy5575 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2012, 11:47 AM
  5. Replies: 3
    Last Post: 03-23-2010, 06:44 PM
  6. Need help with formula or macro to populate one sheet with data filtered from another
    By leveleyed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2010, 12:59 PM
  7. Populate combo box from filtered data
    By brodybear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2007, 04:52 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