Results 1 to 4 of 4

How to iteratively name columns

Threaded View

  1. #1
    Registered User
    Join Date
    05-15-2011
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    2

    How to iteratively name columns

    Hi

    I have a worksheet with a few hundred data columns (containing 500 rows) of historical stock prices each with a heading (in my case, the ticker of the asociated stock).
    I wish to automatically name the columns as the respective tickers.

    What I want is something like this

    for c = 2 to 500
    
    range(Cells(3,c) : (503,c).name = range("2,c").text
    here c is the column number. and the data is from rows 3 to 503.

    I cant get the syntax right, or I keep getting a global range error.
    Please help.
    Last edited by darsh89; 05-22-2011 at 09:08 PM.

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