+ Reply to Thread
Results 1 to 7 of 7

Return specific value from a named range in a userform

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Return specific value from a named range in a userform

    Hi is it possible to return the first value from a named range in a textbox on a userform?

    Currently I am using this code to return a list to choose from, I am testing a way to do this with FLOWRAP


    Please Login or Register  to view this content.
    What I want to do is for this example there are 8 values in the named range "FLOWRAP"

    In textbox95 I want to return the first value in that named rang, box96 the 2nd, box 97 the 3rd and so on........

    is this possible, if so what do I need to put in my code
    Please Login or Register  to view this content.
    Any help is great as I cant find anything to help me searching the internet!

    Thanks

    Dan

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Return specific value from a named range in a userform

    Assuming the cells in the named range increase by 1 row

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394
    Quote Originally Posted by stnkynts View Post
    Assuming the cells in the named range increase by 1 row

    Please Login or Register  to view this content.
    Thanks stnkynts I will give that a go when I am back on the pc ☺

  4. #4
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Return specific value from a named range in a userform

    is there a way to change
    Please Login or Register  to view this content.
    to something like
    Please Login or Register  to view this content.
    I tried but doesnt seem to work?

    Dan

  5. #5
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Return specific value from a named range in a userform

    i have found this on the internet

    Please Login or Register  to view this content.
    But is there a way to change ("Named_Range_Multi") to whatever is in Textbox94?

    Dan

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Return specific value from a named range in a userform

    =range ("Textbox94.value").cells(i, 1)
    I tried but doesnt seem to work?
    You would need to remove the quotes for this to work. However, depending on the value in Textbox94 your method is prone to errors.

    i have found this on the internet
    But is there a way to change ("Named_Range_Multi") to whatever is in Textbox94?
    Macros are almost always (99%) workbook specific. You can almost never copy a macro from then internet, intended for someone else, and paste it into your sheet and have it work exactly the way you want. Case in point is what you have supplied. It will accomplish nothing for you.
    Last edited by stnkynts; 09-04-2015 at 10:27 AM.

  7. #7
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Return specific value from a named range in a userform

    Ah yeah i understand they are specific to each individuals workbook (most the time) but using this as a basis to work on it could work, just wondering if it was possible to get the value from textbox94 rather than telling it to look at a specific named range like in this example

    Thank you

+ 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. How to Return a Named Range
    By MightyMack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2014, 12:49 PM
  2. [SOLVED] Used named range in listbox on userform
    By WilliamWu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2013, 08:04 AM
  3. [SOLVED] Determine what Named Range the Target Address is and return Named Range Name
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2012, 10:49 PM
  4. listbox populating on userform with named range
    By kmsoni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2011, 01:37 PM
  5. listbox populating on userform with named range
    By kmsoni in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2011, 02:31 PM
  6. INDEX several named tables to return a specific value in the table
    By FunkyDragon in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-29-2010, 05:54 PM
  7. Dyn Named Range update from userform
    By KD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2006, 04:20 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