Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default excel "name is not valid" when naming a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default excel "name is not valid" when naming a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default excel "name is not valid" when naming a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default excel "name is not valid" when naming a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default excel "name is not valid" when naming a cell

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
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
Formula to confirm entry in Col "C" is valid for data in Col "A" VAPCMD Excel Discussion (Misc queries) 2 January 2nd 09 07:58 PM
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 Milky Excel Worksheet Functions 1 August 20th 08 08:38 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Naming cell ranges, copying formulas for a range & nesting "IF" fu DonF Excel Discussion (Misc queries) 3 October 5th 06 05:47 PM
Why is "History" a "reserved name" while naming Excel worksheets? Pradeep Excel Discussion (Misc queries) 1 June 30th 06 12:55 PM


All times are GMT +1. The time now is 01:57 AM.

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"