LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ADB ADB is offline
external usenet poster
 
Posts: 3
Default Assigning set of range names

I have a set of data arrranged in a 10x10 array.

I want to use the contents of cell (1,1) as the name for the range of cells
(2,1), (3,1)..(10,1); and perform a similar operation on columns 2,3...10.

I wrote the code:

Sub assignames()
Dim category As String
For i = 1 To 10
category = Cells(1, i)
Range(Cells(2, i), Cells(10, i)).Name = category
Next i
End Sub

The debugger faults me on the line "Range....=". I guess this is some kind
of mismatch of variable types. But this is my first excusrion into VBA and I
am floundering. Any help appreciated!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Assigning Range Names in one spreadsheet/worksheet bretsharon[_2_] Excel Discussion (Misc queries) 2 February 5th 08 01:34 AM
Assigning numbers to names Levi Excel Discussion (Misc queries) 1 May 4th 06 10:35 PM
Assigning range names to arrays Kurt Krueger Excel Programming 2 August 25th 04 01:07 AM
Assigning User Names depuyus[_8_] Excel Programming 3 August 10th 04 08:38 AM
Assigning names to a route Jim[_22_] Excel Programming 1 April 18th 04 08:56 PM


All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"