+ Reply to Thread
Results 1 to 5 of 5

Conditionally add cell values to listbox

  1. #1
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Conditionally add cell values to listbox

    Hello to all,
    I'm attaching a file containing a userform with a listbox that gets populated when the form shows.
    With the current code all countries are added to the listbox.
    My goal is to add only the Active countries, where column D contains "A".
    I tried several approaches but none worked.
    Can someone please give me a hand on this?
    Many thanks for any kind help.
    Octavio
    Attached Files Attached Files
    Last edited by oteixeira; 01-13-2023 at 12:27 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Conditionally add cell values to listbox

    Hi, Octavio. Try with:

    Please Login or Register  to view this content.
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  3. #3
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Conditionally add cell values to listbox

    Or eventually you can try:

    Please Login or Register  to view this content.
    Last edited by beyond Excel; 01-13-2023 at 01:34 PM.

  4. #4
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: Conditionally add cell values to listbox

    Hello,
    Thanks a million, your first solution works perfectly so I used it.
    Many thanks
    Octavio

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Conditionally add cell values to listbox

    Thanks for the +rep.

+ 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] Conditionally Formatting based on 2 different cell choices / values.
    By tacnola in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-13-2021, 12:41 PM
  2. Replies: 15
    Last Post: 07-31-2020, 10:10 AM
  3. [SOLVED] Show unique values in listbox and activate related cell if i select value in Listbox
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2018, 06:54 AM
  4. Replies: 1
    Last Post: 01-04-2017, 06:00 PM
  5. Replies: 1
    Last Post: 01-04-2017, 05:59 PM
  6. Conditionally hide/unhide worksheets based on cell values
    By David O'Riley in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2015, 09:47 AM
  7. All selected listbox values to a cell?
    By HK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2006, 07:10 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