+ Reply to Thread
Results 1 to 9 of 9

Combo Boxes with multiple named ranges?

  1. #1
    Registered User
    Join Date
    07-24-2024
    Location
    El Paso, TX
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Combo Boxes with multiple named ranges?

    I have been trying to create a combo box that contains names of clients (which change dynamically as new clients are added) to generate their data into an invoice. The issue is that each named range associated with a client contains several rows of data, so I can't simply make a "Client" column without leaving several blank cells.

    This is what the data looks like; further client entries have the same Cost Codes, but use different pricing and other factors per code:
    Account Data.PNG

    I tried to create a separate named range for clients with the formula:
    Please Login or Register  to view this content.
    But despite COUNTA ignoring blanks, I get blanks (or 0's when testing it in a worksheet) instead of the client names that should be further underneath:
    ComboBox.png
    Output.PNG

    Is there an easier way to approach this? If I make each client table a named range, can a combo box contain a list of those named ranges to refer to? I feel like I'm missing something obvious, and I need help

  2. #2
    Forum Contributor
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    121

    Re: Combo Boxes with multiple named ranges?

    It looks like your client range (A2:A2000?) has names separated by blanks, which will cause the issue you have.

    One solution would be to create a filtered list (without blanks)..something like
    =FILTER(A2:A2000,(A2:A2000<>""))

    (Let's say you put that formula in B1) you would then use as your source in your data validation;

    =B1#

    OR (of course) you could just get rid of the blanks in your client range manually, then your range should dynamically extend as required using something very similar to what you already have as your source.
    Last edited by Eeza Goodun; 07-24-2024 at 10:02 PM.

  3. #3
    Registered User
    Join Date
    07-24-2024
    Location
    El Paso, TX
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Combo Boxes with multiple named ranges?

    Thank you! This is a huge leap forward.

    The issue now is that, while the formula functions in a worksheet, it doesn't seem to work when used in a named range. Essentially, when I use the formula in a named range:
    WorkingFormula.PNG

    NameManager.PNG

    My combo box doesn't generate anything:
    Properties.PNG

    ComboBox2.png

    I also tried referencing the cell containing the formula, using =A3# but got the same result as above.

    Do combo boxes and named ranges that use a FILTER formula just not play well together? Or am I missing something else here?
    Last edited by Djeuve; 07-25-2024 at 03:30 PM.

  4. #4
    Forum Contributor
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    121

    Re: Combo Boxes with multiple named ranges?

    Attach your workbook and I'll have a look at it for you.

  5. #5
    Registered User
    Join Date
    07-24-2024
    Location
    El Paso, TX
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Combo Boxes with multiple named ranges?

    Sure! Here you are:
    Bid Estimate WIP8.xlsm

    I had to delete a number of low-priority tabs to keep the file size down, but for the function of getting the combo box to work, everything necessary is included.

  6. #6
    Forum Contributor
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    121

    Re: Combo Boxes with multiple named ranges?

    Yeah...not much help with your code protected by password, so I have tried to replicate your application (see attached).
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor MikeVol's Avatar
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    405

    Re: Combo Boxes with multiple named ranges?

    Hello @Djeuve.
    Put this code in ThisWorkbook Module
    Please Login or Register  to view this content.
    And Remove the ListFillRange, look at screenshote below. Save your changes, close the book and open it again. Good luck.
    Attached Images Attached Images
    Last edited by MikeVol; 07-26-2024 at 06:31 AM. Reason: Update
    NOTE: As the original poster/owner, only you can mark your thread as SOLVED (Thread Tools above Post #1).
    You can say "Thanks" in your thread to everyone who offered to help you.
    You can also reward them by clicking * "Add Reputation" under their username on the left.
    With Regards, MikeVol.

  8. #8
    Registered User
    Join Date
    07-24-2024
    Location
    El Paso, TX
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Combo Boxes with multiple named ranges?

    Oh my goodness, thank you both so much! That ended up being the solution. The rest was a simple matter of using the INDIRECT function to refer to each clients' respective named range, and voilà!

    Much appreciated!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2411 (Windows 11 23H2 64-bit)
    Posts
    88,072

    Re: Combo Boxes with multiple named ranges?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] Userform with Cascading Combo Boxes Based on Dynamic Named Ranges...
    By halee66778 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-21-2019, 03:26 PM
  2. Dynamic Ranges for Combo Boxes
    By BONCH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2017, 07:16 PM
  3. [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
  4. 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
  5. Replies: 3
    Last Post: 07-28-2014, 03:16 PM
  6. [SOLVED] Adding dynamic named ranges to combo boxes in userform
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 09:45 AM
  7. Drop down boxes and Named ranges
    By Harry_Potter in forum Excel General
    Replies: 5
    Last Post: 01-09-2008, 07:05 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