Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want a macro to be able to reassign the cell location associated with
a “name”. I believe to do so requires three steps: (1) Test to see if name has already been assigned, and if so, (2) DELETE. (3) Assign the name to the current active cell. PROBLEM AREA - It would seem to me that the test would use code such as: If[ActiveWorkbook.Names("Priority").Value 0] then …. BUT I KNOW THIS CODE IS NOT RIGHT. If it is already in use, the name can be removed by the code: ActiveWorkbook.Names("Priority").Delete The name can then be added back using something like: ActiveWorkbook.Names.Add Name:="TheData", RefersTo:="=Sheet1![A1,E10]" Or alternatively Range("A1:E10").Name = "Priority" Or possibly ActiveWorkbook.ActiveSheet.ActiveCell.Name = "Priority" SUGGESTIONS WOULD BE APPRECIATED for the proper syntax to test for a specific name having been already assigned to a cell or region. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Access to a series, when it is assigned to an empty range | Excel Worksheet Functions | |||
TESTING A RANGE OF CELLS | New Users to Excel | |||
Testing a person's age to be within a range | Excel Worksheet Functions | |||
Assigned specific decimal space | Excel Programming | |||
Testing for content in Range | Excel Programming |