+ Reply to Thread
Results 1 to 13 of 13

Combo Box with Ranges Lists

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Combo Box with Ranges Lists

    Is it possible to create a Combo Box that lists a series of different ranges? For example:


    Column Name: Neighborhood Population
    List Item 1 1 thru 1000
    List Item 2 1001 thru 2000
    List Item 3 2001 thru 3000
    List Item 4 3001 thru 4000
    List Item 5 4001 thru 5000

    and so on...

    Whatever list item I choose will be the search criteria to show only those rows that meet this criteria.

    Thanks in advance!

    Dan

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Combo Box with Ranges Lists

    Sorry, not sure what you're trying to achieve.
    • Is this combobox on a userform, or on a worksheet?
    • What are the options in the combobox?
    • What should the result be when user selects an option
    • How should those results be displayed?
    Perhaps it would be easier if you posted a cut-down worksheet showing some dummy data, and the intended result? Please see the yellow band at the top of the page to see how

    Tim
    Never stop learning!
    <--- please consider *-ing !

  3. #3
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    Hi Tim:

    Thanks for responding so quickly.

    The Combo Box will be placed in an Excel 2010 worksheet. The choices I displayed in my post would be equivalent to the items shown. For example in standard mathematics notation it would be a≤x≤b. In my examples it would be 1000≤x≤1, 2000≤x≤1001, 3000≤x≤2001, 4000≤x≤3001, 5000≤x≤4001.

    Whenever any of these items in the Combo Box is selected, the entire worksheet would be condensed to show only those rows that fulfilled the selected criteria for the column titled Neighborhood Population.

    My question boils down to, Is there any format that Excel will use to accomplish each range? Will the Mathematics Notation work? I think this as clear as I can explain what I want to do.

    Dan

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Combo Box with Ranges Lists

    This will give you an IDEA...Not sure on the mathematical Notation Values in your Column...Perhaps a sample file upload will clarify...
    Attached Files Attached Files
    Last edited by sintek; 04-13-2020 at 05:40 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    Hi sintek:

    Thanks for your thoughtful and quick response.

    I looked at your method and it correctly selected the ranges. The problem in your dropdown, for my purposes, is Item List 1, Item List 2, etc. is not descriptive enough for my end user to use. For example:

    Range between 1 to 1000
    Range between 1001 to 2000
    and so on.


    Item Start End
    Range from 1 to 1000 1 1000
    Range from 1001 to 2000 1001 2000
    Range from 2001 to 3000 2001 3000
    Range from 3001 to 4000 3001 4000
    Range from 4001 to 5000 4001 5000

    Maybe this will work!

    Thanks,
    Dan
    Last edited by nytwodees; 04-13-2020 at 03:51 PM.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Combo Box with Ranges Lists

    So update the list on sheet2...to your names...
    Untitled.png
    Last edited by sintek; 04-13-2020 at 03:12 PM.

  7. #7
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    Hi sintek:

    Yes it does work now. When I 1st changed the column text in column 1, 2nd sheet, it didn't work for some reason. However, when I closed the file and just reopened it, it worked just fine (probably an updating problem).

    I posted a good rating for you for your fine effort.

    Thanks again,

    Dan

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Combo Box with Ranges Lists

    Oh that is because the ComboBox was populated on opening of workbook...
    Please Login or Register  to view this content.
    Glad you got it sorted...tx for rep +

  9. #9
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    Hi Sintek:

    Sorry to bother you again.

    1. I want to copy the table from Sheet 2 to a blank area on Sheet 1. I then want to delete Sheet 2. I will hide the copied table on Sheet 1. I know this will affect the coding in the macro you originally submitted. Can you produce a revised macro to accommodate my change.

    2. Can the Sub Auto Open() be eliminated?

    3. If I decide to not use a Combo Box, but instead instead have the end user supply his own range, can that be done? What would the search criteria look like for a range of 1 o 1000, as an example?

    Thanks again for your help and patience!

    Dan

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Combo Box with Ranges Lists

    Upload a sample file of what you are wanting to achieve...Detailed description...

    I am not sure what you are making use of...

  11. #11
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    This is your original sample you sent to me:

    https://www.excelforum.com/attachmen...lists-dan.xlsm

    For some unknown reason to me, I cannot find where to attach your original attachment (so I supplied the link above). Let me know if that works for you. Maybe this will let you recall how and why you responded.

    Dan

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: Combo Box with Ranges Lists

    I have that... I want you to upload a sample of your proposed requirement and a detailed explanation of required result... the sample I submitted is I am assuming nothing like your actual file...

  13. #13
    Registered User
    Join Date
    04-28-2013
    Location
    Long Beach, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combo Box with Ranges Lists

    My laptop with my file in it is scheduled to be returned tomorrow from Dell repair. As soon as I have my computer back I will send you the file.

    Dan

+ 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. Replies: 3
    Last Post: 07-28-2014, 03:16 PM
  2. Dependent Drop Down Lists, or VBA Combo Box?
    By mjninc in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 03-12-2013, 03:29 PM
  3. Combo Box to be linked with named lists
    By Nicola13 in forum Excel General
    Replies: 0
    Last Post: 08-31-2012, 10:18 AM
  4. Hide Combo Lists
    By mjg060468 in forum Excel General
    Replies: 2
    Last Post: 04-16-2012, 09:56 AM
  5. Clear button adds to combo box lists
    By alann2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-17-2006, 08:26 AM
  6. How to select one of three lists for a combo box?
    By Ingeniero1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2006, 02:33 PM
  7. Dynamic combo Lists??
    By mickiedevries in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2005, 11:34 AM

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