Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
testing range of cells for part of cell content | Excel Worksheet Functions | |||
defining unique range of cells for different sheets as the same n. | Excel Discussion (Misc queries) | |||
Drop down defining content of a range of cells | Links and Linking in Excel | |||
Defining Range of For Each Loop for Cells and Worksheets | Excel Programming | |||
Defining a variable Range for cells with values in them! | Excel Programming |