+ Reply to Thread
Results 1 to 3 of 3

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 .value
    Please Login or Register  to view this content.
    Try 2, Looking at .Visible
    Please Login or Register  to view this content.
    Both attempts appear to be accepting the first IF statement as true and 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
    Registered User
    Join Date
    02-11-2016
    Location
    Wisconsin
    MS-Off Ver
    07-360
    Posts
    53

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

    I apologize for multi posts of this, I had an error while posting and tried again, If a mod could delete the duplicates, that would be great, thanks!

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

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

    An answer was presented on the duplicate of this, I am adding it here in case someone finds it via search.
    Please Login or Register  to view this content.

+ 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] Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2016, 08:38 PM
  2. Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2016, 03:45 PM
  3. 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
  4. [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
  5. 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
  6. 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
  7. Where to populate Combo Boxes
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-14-2011, 06:55 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