+ Reply to Thread
Results 1 to 7 of 7

Test values in a dynamic Table and add to an Array for display in a List box

  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    California, USA
    MS-Off Ver
    Excel 2019
    Posts
    94

    Test values in a dynamic Table and add to an Array for display in a List box

    Hello. I have the following problem I am unable to solve:

    I'm working with a multi-column dynamic table in which I need to test all rows for the value "False" in two specific columns (35 & 36), and for those rows that meet the criteria, transfer specific columns into an array for display in a List Box on a user form.

    I have attached a working example that pulls into the List box all the rows in the Table, but I'm unable to figure out how to evaluate the two columns and only bring in rows that meet the "False" criteria in columns 35 & 36.

    The attached example includes the additional loop code I have tried to use to evaluate the two columns, but I don't know how to fill the array with only the desired records. I either get no records, one record or an error.

    Thanks for any help you can offer!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    How about
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2010
    Location
    California, USA
    MS-Off Ver
    Excel 2019
    Posts
    94

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    Thanks. I took a run at this and dropped it into the attached file after line 25 and before line 26, but the result is the same....all records still show in the list box, so does not seem to filter out. Did I not add it in correctly?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    No you did nothing wrong, I misread the requirement & filter for either column being False, rather than both.
    Simply change the + her to an *
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2010
    Location
    California, USA
    MS-Off Ver
    Excel 2019
    Posts
    94

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    Brilliant! Works perfectly. I'm a self-taught hack trying to learn on the fly, so will take me a bit to digest your piece of code and see if I can figure out what its doing to achieve the result. Many thanks for getting me over this hurdle!

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    Glad to help & thanks for the feedback.

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Test values in a dynamic Table and add to an Array for display in a List box

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-27-2020 at 06:00 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. [SOLVED] Pull all values from UserForm List Box and Paste them to Dynamic Array in Worksheet
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2018, 01:08 PM
  2. [SOLVED] listing array values in a dynamic list based on 2 criteria from ranges
    By lkeltner in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-14-2016, 01:45 PM
  3. [SOLVED] Dynamic name list to change depending on values in a table
    By Masun in forum Excel General
    Replies: 6
    Last Post: 06-22-2015, 10:47 AM
  4. Array formula to automate display of Fleet List data from a Table
    By azatherazza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2014, 04:06 AM
  5. Dynamic list based on values on a table
    By adrianodl in forum Excel General
    Replies: 2
    Last Post: 08-21-2012, 11:55 PM
  6. [SOLVED] Count consecutive non-zero values; list first non-zero value; display counts as an array
    By treznick in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-17-2012, 08:25 PM
  7. [SOLVED] Can I test dynamic array for empty?
    By LabElf in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-11-2005, 02:10 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