Results 1 to 3 of 3

Using VBA to name intersecting ranges

Threaded View

tetreama Using VBA to name... 08-07-2012, 08:46 PM
venkat1926 Re: Using VBA to name... 08-08-2012, 01:54 AM
JosephP Re: Using VBA to name... 08-08-2012, 02:03 AM
  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Using VBA to name intersecting ranges

    Hi. I'm looking for some code that will create intersecting named ranges. I have to create ranges in this format for a great number of columns. Trying to automate this somehow.

    I'd like to create the following named ranges in this format:

    Range Name Refers to
    Table Worksheet!$A$1:$D$5
    Table.Field1 Table Worksheet!$A:$A
    Table.Field2 Table Worksheet!$B:$B
    Table.Field3 Table Worksheet!$C:$C
    Table.Field4 Table Worksheet!$D:$D

    I used code from the following thread that gets me close to a solution: http://www.excelforum.com/excel-prog...-new-post.html

    The problem with this code is that there are quotation marks in the range reference, such as ="Table'!$A$2:$A$5". I need the code to produce the range =Table'!$A$2:$A$5. A sample spreadsheet is attached


    Thanks for anyhelp you can provide. Much appreciated.
    Attached Files Attached Files

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