Results 1 to 12 of 12

Dynamically re-name a Named Range

Threaded View

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Dynamically re-name a Named Range

    I need to create a macro that will re-name a Named Range of cell A1 to match the text in cell A1 of each Worksheet. Cell A1 on each worksheet is composed of an "if" formula, which will change between the two options based on if the corresponding box is checked on the Checklist Worksheet.

    Here's my VB, which isn't working:
    Sub Dynamic_Range()
    Dim wkst As Worksheet
    For Each wkst In ActiveWorkbook.Worksheets
    wkst.Select
    Range("a1").Name = Range("a1")
    Next wkst
    End Sub

    I can get it to change the name of the named range to "addtopdf" but can't get it to change back to "check0", "check1" and "check2".

    If you look at the attached, it should be much clearer.

    Any help is greatly appreciated.
    Attached Files Attached Files

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