Results 1 to 1 of 1

Add name to range

Threaded View

  1. #1
    Registered User
    Join Date
    10-19-2006
    Posts
    4

    Add name to range

    In order to perform automatic matrix operation I want to add name to a series of column...Something like :
    R1C1:R10C1 = name "C_1"
    R1C2:R10C2 = name "C_2"
    R1C3:R10C3 = name "C_3"

    The code should look like this:

    For i=1 to 3
    ActiveWorkbook.name.Add Name = "C_" & i, RefersToR1C1 ="=Sheet1!R1C & i : R10C & i "
    Next i

    Thanks for you help.

    I find it....
    For i=1 to 3
    ActiveWorkbook.Names.Add Name:="C_" & i, RefersToR1C1:=Range(Cells(1, i), Cells(10, i))
    Next i
    Last edited by MOONShadow; 11-20-2006 at 12:01 AM.

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