+ Reply to Thread
Results 1 to 3 of 3

Set a variable to a dynamic named range

  1. #1
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Set a variable to a dynamic named range

    At present I use for example Dept1 = " ss, ww, rr, hj " to define a variable that I use in a sort code. I need to allow the user to preset their own values and number etc so they could end up with something like " asd, ert, fgt, vv, ff, hh, yy ". Most users will not be able to alter code.
    I have set up a dynamic named range (" List1 ") on one sheet using offset and count so any number of letter conbinations can be added.
    How do I code my programme something like Dept1 = Range ("List1") ??

    Many Thanks
    Last edited by BarryTSL; 03-20-2012 at 06:18 AM.

  2. #2
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: Set a variable to a dynamic named range

    So you want to end up with a comma delimited string? Then perhaps:

    Please Login or Register  to view this content.
    Assumptions:

    1. List1 is a single column range (not single row range)
    2. List1 will contain at least 1 value

  3. #3
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: Set a variable to a dynamic named range

    Thank you for such a quick reply, looks like just what I needed.

+ 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