+ Reply to Thread
Results 1 to 5 of 5

listbox populating on userform with named range

  1. #1
    Registered User
    Join Date
    03-21-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    22

    listbox populating on userform with named range

    Hello Everyone,


    1.
    want to create a named range range2 and want to set range (b8:f8), (b9:f9) and (b10:f10) under it, this I want to do so that I can use named range range2 as chartrange source. I want to populate revenue(b8:f8), cost (b9:f9) and total (b10:f10) in listbox, so when i select revenue from listbox it should refer to range2 (b8:f8) and accordingly change the chart graph, when i select cost from listbox it should refere to range2(b9:f9) and accordingly change the chart graph shwing cost figures.

    Please find the attached spreadsheet with 2 userforms and description of the problem. help is appreciated. Thanks in advance.

    Karan
    Attached Files Attached Files
    Last edited by kmsoni; 09-27-2011 at 04:40 PM. Reason: missed attachment

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: listbox populating on userform with named range

    Karan,

    Attached is a modified version of your example workbook. Is something like that what you're looking for?

    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-21-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: listbox populating on userform with named range

    Hello Tigeravatar,

    I was actually looking for setting the range2 as a named range and creating subranges under it. then i wanted to mention the range2 as source for chartrange. Please help me with this modification. Thanks.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: listbox populating on userform with named range

    (From a private message):

    kmsoni,

    Quote Originally Posted by kmsoni
    i want to use like

    Please Login or Register  to view this content.
    I have no idea why you would want to do it that way as its quite inefficient. However, if you really need it to work like that you can use the following:

    Code:
    Please Login or Register  to view this content.


    As for your second request:

    Quote Originally Posted by kmsoni
    and I want to create two listbox with same ranges so when my chart shows values from listbox1 and listbox2 as cost n revenue selected from two listboxes. and also userform should have option for having different chart types on it
    For this you should probably start a new thread with a new example workbook as I'm not sure what you mean

    ~tigeravatar

  5. #5
    Registered User
    Join Date
    03-21-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: listbox populating on userform with named range

    [QUOTE=tigeravatar;2608879](From a private message):


    Hello Tigeravatar,

    Thanks for your time and help. I appreciate it. I tried to run your modified code but its not running. plz check and help me with getting solution. I am trying to find solution since last week for same question, but nobody is able to answer it correctly. I expect that you will help me. Thanks.




    kmsoni,



    I have no idea why you would want to do it that way as its quite inefficient. However, if you really need it to work like that you can use the following:

    Code:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-03-2011 at 05:12 PM. Reason: Corrected Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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