+ Reply to Thread
Results 1 to 2 of 2

Macro for creating named ranges from relative referencing

  1. #1
    Registered User
    Join Date

    Macro for creating named ranges from relative referencing

    Please help with a quandry of relative referencing and macro development.

    I have a spreadsheet with a varying number of columns, possibly a hundred columns or more. Each cell 1 of a column contains a name, which should also be the range name of cells 2 through 1000 of that column.

    I would like to create a macro that checks cell 1 of column B for a name, then selects cells B2 - B1000 and names the range the same name as cell B1, then moves to the next column, does the same thing repetitively until it reaches a blank column.

    I've got a handle on the looping, but the relative referencing has me stumped.

    Any help would be appreciated. Thanks in advance.

  2. #2
    Forum Guru shg's Avatar
    Join Date
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Why not just select A1:X1000, and do Insert > Name > Create, Top row?

    And if you particularly want to do it via macro, record it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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


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