Thread
:
defining a range of cells in excel using cell content
View Single Post
#
2
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_]
external usenet poster
Posts: 414
defining a range of cells in excel using cell content
This takes the value in cell A1 and uses that as the name for D1:D10 on
sheet1.
Dim theName As String
theName = Cells(1).Value
ActiveWorkbook.Names.Add Name:=theName, RefersToR1C1:= _
"=Sheet1!R1C4:R10C4"
Hope this helps
Rowan
wrote:
I am attempting to create a macro that will allow me to define a range
of cells, with the "name" for said range of cells coming from the
content of a cell. Rather than manually entering the name of the range
of cells using the insertnamedefine function, I am hoping to create a
macro that automatically selects a cell's content as the name for said
range. Any insight would be most appreciated. Thanks
Reply With Quote
Rowan Drummond[_3_]
View Public Profile
Find all posts by Rowan Drummond[_3_]