Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am programmatically naming cells based on a header row and their
position. The problem is not in code but in a name I am trying to use. I am trying to name a cell 'C2a.1' and I get 'That Name is not Valid'. When doing this manually I get the same error. Looking at the help I know I can't name a cell or range like a valid Excel reference e.g. A2 or $A$2 or R1C2 etc... but this is a mystery to me! Any ideas? Steve |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel doesn't even like names that even look close to an address.
And C2 could be cell C2 (in A1 reference style) or column 2 (in R1C1 reference style). Maybe you can just prefix your names with an undersco _C2a.1 Or something unique that you want to use. cheesey_toastie wrote: I am programmatically naming cells based on a header row and their position. The problem is not in code but in a name I am trying to use. I am trying to name a cell 'C2a.1' and I get 'That Name is not Valid'. When doing this manually I get the same error. Looking at the help I know I can't name a cell or range like a valid Excel reference e.g. A2 or $A$2 or R1C2 etc... but this is a mystery to me! Any ideas? Steve -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve,
Many invalid names can become 'valid' if you use a leading undersocre "_" '_C2a.1' will work. And it should be easy to modify your code to do it... HTH, Bernie MS Excel MVP "cheesey_toastie" wrote in message ups.com... I am programmatically naming cells based on a header row and their position. The problem is not in code but in a name I am trying to use. I am trying to name a cell 'C2a.1' and I get 'That Name is not Valid'. When doing this manually I get the same error. Looking at the help I know I can't name a cell or range like a valid Excel reference e.g. A2 or $A$2 or R1C2 etc... but this is a mystery to me! Any ideas? Steve |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It seems to be because it begins with a C, then a digit then a
letter... cheesey_toastie wrote: I am programmatically naming cells based on a header row and their position. The problem is not in code but in a name I am trying to use. I am trying to name a cell 'C2a.1' and I get 'That Name is not Valid'. When doing this manually I get the same error. Looking at the help I know I can't name a cell or range like a valid Excel reference e.g. A2 or $A$2 or R1C2 etc... but this is a mystery to me! Any ideas? Steve |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I hate Excels use of names. I am already using things like c2.1 c2.5
its just the c2a.1 I would guess its a bug in the bit of code that validates the name as it looks close to a R1C1 style formula. Oh well.. workaround time! Thanks for the underscore suggestion, I had already done that as a test - it's not ideal as I am actually using these codes in a third party system. Thanks for the replies cheesey_toastie wrote: It seems to be because it begins with a C, then a digit then a letter... cheesey_toastie wrote: I am programmatically naming cells based on a header row and their position. The problem is not in code but in a name I am trying to use. I am trying to name a cell 'C2a.1' and I get 'That Name is not Valid'. When doing this manually I get the same error. Looking at the help I know I can't name a cell or range like a valid Excel reference e.g. A2 or $A$2 or R1C2 etc... but this is a mystery to me! Any ideas? Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to confirm entry in Col "C" is valid for data in Col "A" | Excel Discussion (Misc queries) | |||
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Naming cell ranges, copying formulas for a range & nesting "IF" fu | Excel Discussion (Misc queries) | |||
Why is "History" a "reserved name" while naming Excel worksheets? | Excel Discussion (Misc queries) |