Results 1 to 11 of 11

ArryLists for Multi-Column

Threaded View

  1. #1
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Post ArryLists for Multi-Column

    Good Morning,

    I'm trying to Frankenstein some code together to build a report-like userform.

    It works for what I need aside from only listing the information on a single column. Hows it setup is that a User can select a list of buttons , depending on what is selected the buttons are assigned a value that is sent to an assigned cell. Based on the value of that cell, the userform will filter the data. The way it is now, works for what I want so multiple people can pick up reports at the same time.

    If anyone knows a way to modify this allow the first column to be to be filtered but show the entire row. I'd truly appreciate it.

    The code;

    Dim i As Long 
    Dim arrLists As Variant 
    With Sheet8 
    
    Me.ListBox1.Clear 
    
    If.Range("A" & .Rows.Count).End(xlUp).Row > 1 And Trim(Sheet2.Range("AP6").Value) <> vbNullString Then 
       arrLists = .Range("A1:G25" & .Range("A" & .Rows.Count).End(xlUp).Row).Value
    
    For i = LBound(arrLists) To UBound(arrLists)
       If InStr(1, arrLists(i, 1), Trim(Sheet2.Range("AP6").Value), vbTextCompare) Then 
           Me.ListBox1.AddItem arrLists(i, 3)
        End If 
      Next i
    End If 
    
    If Me. ListBox1.ListCount = 1 Then Me.ListBox1.Selected(0) = True 
    End With 
    End Sub
    Please let me know if I can provide any further details. i will not be able to send a copy of the workbook or sheet.
    Last edited by UnloadMe; 12-16-2020 at 12:18 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multi-column dropdown list using multi-column dynamic range (no VBA)
    By ysdai7287 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-04-2018, 03:59 AM
  2. Replies: 1
    Last Post: 12-26-2017, 11:48 PM
  3. Copy Multi Rows From Multi Sheets Based On Column Value And Create New Workbooks
    By Huskersippi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2017, 04:51 PM
  4. 1 column into multi-columns and multi-rows
    By affj in forum Excel General
    Replies: 7
    Last Post: 07-17-2013, 09:34 AM
  5. Replies: 19
    Last Post: 10-05-2012, 01:03 PM
  6. Multi-Column Listboxes correspond to multi textboxes
    By Crebsington in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2012, 01:38 PM
  7. Sum with Multi Criteria in Multi Column
    By markuss in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2010, 05:35 PM

Tags for this Thread

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