+ Reply to Thread
Results 1 to 2 of 2

Range Name Based off of Cell Value

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Somewhere
    MS-Off Ver
    Excel 2010
    Posts
    9

    Range Name Based off of Cell Value

    I want to have a range name based off of a cell value. So, for example:

    If A1:A2 is the range I want named, what would I do so that the name of that range is based off of the text in B1?


    I don't know if this is possible, but I appreciate any help!
    Last edited by scherich; 04-27-2013 at 12:53 AM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Range Name Based off of Cell Value

    It is possible if you use a macro. Something like this perhaps.
    Please Login or Register  to view this content.
    Problem with that is that the name is static i.e. if you change the value in B2 the new name will not get updated unless you rerun the macro. The workaround is to use the "Worksheet_Change" event. Then name will then get updated every time value in B2 is changed.

    Please Login or Register  to view this content.
    To add this code right click on the active sheet, click code and paste this code in the windows that opends. This code is only active on the sheet it is pasted to.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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