Closed Thread
Results 1 to 2 of 2

Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)

  1. #1
    Registered User
    Join Date
    02-11-2016
    Location
    Wisconsin
    MS-Off Ver
    07-360
    Posts
    53

    Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)

    Hi, I am using Excel '07 and have a user form which allows the user to list people present divided into 2 groups. Currently I have 10 combo boxes for staff, as well as an additional 10 combo boxes for others. Each grouping of combo boxes is populated by using a dynamic range referencing each category (probably TMI but you never know). The goal is to have all of the staff listed in one cell on the worksheet (cells(3, "J")) and all of the other people in (cells(3,"K")). I would like each person to be separated by a comma and the last to have an Ampersand before it [Staff1, Staff2, .... Staff9, & Staff10]. Getting this to work with all 10 combo boxes is not an issue, but I would like to have it work without unnecessary punctuation if say only 4 list boxes are used. Results should appear as [Staff1, Staff2, Staff3, & Staff4], but currently are [Staff1, Staff2, Staff3, Staff4, , , , , , &].

    I have tried to get this with 2 different (staff & other) IF and ElseIF statements which I believe to be the issue as it seems in both instances, it is accepting the first IF.

    ComboBox Properties:
    All except the first (eg. CB_Staff1) have .visible = False as default. If the Previous ComboBox is populated, then code will switch to .visible = True. All ComboBoxes have a default .value = [Blank] <--Could this be an issue?

    Try 1, Looking at .visible
    Please Login or Register  to view this content.
    Try 2, Looking at .Value
    Please Login or Register  to view this content.
    Both attempts are showing the same result [Staff1, Staff2, Staff3, Staff4, , , , , , &] not what I am looking for [Staff1, Staff2, Staff3, & Staff4].

    I have been trying to figure this out for 2 hours. Am I going about this the wrong way?

    Any help on this matter would be GREATLY appreciated!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    I kept the later thread open because you changed something. Please edit the original thread next time instead of creating a new one.

    Thread Closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Populate combo with values from one column and text boxes from other columns
    By Tea_4_2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2016, 07:33 PM
  2. [SOLVED] values in ActiveX combo boxes dependent on multiple criterias
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2016, 11:18 AM
  3. populate a combo box with values of multiple columns from sheet 3
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2015, 01:18 PM
  4. Complex concatenation of values from multiple combo boxes
    By swood15 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2014, 06:59 PM
  5. Where to populate Combo Boxes
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2011, 06:55 PM
  6. Best way to populate worksheet from 2 combo boxes
    By jswasson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-07-2006, 08:25 AM
  7. [SOLVED] Combination of 2 combo boxes to populate 3rd
    By AJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2005, 07:06 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