+ Reply to Thread
Results 1 to 4 of 4

Populate a listbox with data that is shared in two other listboxes

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    Atlanta, Georgia
    MS-Off Ver
    2010
    Posts
    5

    Populate a listbox with data that is shared in two other listboxes

    Good morning,

    I have an excel userform that acts as a database to research details of zip codes. In ListBox1, I have every zip code in the US that spans multiple counties listed upon initializing the userform. In listbox4 I have a small sample of zip codes that a user can type into the worksheet that also populates when initialized. I want to then have Listbox5 list any zip codes that are listed in both listbox1 and listbox 4 so that the user can type in a sample of zips that they are researching and be able to identify which ones span over multiple counties.

    Basically I need a code that can make this happen: If a value(s) shows up in both Listbox1 and Listbox4, then that value(s) shows up in listbox5.

    Any help would be greatly appreciated.

    Thanks!

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Populate a listbox with data that is shared in two other listboxes

    Try this (works on activex control listboxes)

    Please Login or Register  to view this content.
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    02-09-2015
    Location
    Atlanta, Georgia
    MS-Off Ver
    2010
    Posts
    5

    Re: Populate a listbox with data that is shared in two other listboxes

    Do you happen to have a code that will do it in basic listboxes. ActiveX controls are not trusted on my system and I do not have the rights to change it.

    thanks.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Populate a listbox with data that is shared in two other listboxes

    If you use form control listboxes, you probably have a listfillrange connected to them, correct?
    If so, I'd use a helper column
    something like this:

    Please Login or Register  to view this content.
    I'm not sure if this will work, cause have no computer here and am not used to using form controls.
    Last edited by JasperD; 03-07-2015 at 04:21 AM.

+ 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] Populate row with data from ListBox
    By plank in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2012, 04:13 AM
  2. Same order of listbox items in two listboxes
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2010, 09:55 AM
  3. Multi select listbox code not working when 2 listboxes on sheet
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2010, 10:53 AM
  4. Changing rowsource of 2 listboxes based on 3rd listbox.
    By scadaman29325 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2008, 11:20 AM
  5. Listboxes - populate with all worksheet names
    By bluegnu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2006, 09:19 AM

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