Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default edit range name

Should be simple, but just can't nail the syntax.

There is an existing Range Name "Variance".
Merely want whatever cell this line lands on ---
Range("xfd100").End(xlToLeft).Select
--- to become the new address of range name "Variance".

Here's one of a few dozen I've tried that don't work:

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names("Variance").RefersToRange.Sel ection

Thanx in advance for your assistance.

- Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default edit range name

hi
perhaps a small syntax problems....

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names.Add Name:="variance", RefersTo:=Selection

regards
FSt1

"MikeF" wrote:

Should be simple, but just can't nail the syntax.

There is an existing Range Name "Variance".
Merely want whatever cell this line lands on ---
Range("xfd100").End(xlToLeft).Select
--- to become the new address of range name "Variance".

Here's one of a few dozen I've tried that don't work:

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names("Variance").RefersToRange.Sel ection

Thanx in advance for your assistance.

- Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default edit range name


The Add Name threw me off, thought it should be Edit Name.
But it works.
Thanx.

"FSt1" wrote:

hi
perhaps a small syntax problems....

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names.Add Name:="variance", RefersTo:=Selection

regards
FSt1

"MikeF" wrote:

Should be simple, but just can't nail the syntax.

There is an existing Range Name "Variance".
Merely want whatever cell this line lands on ---
Range("xfd100").End(xlToLeft).Select
--- to become the new address of range name "Variance".

Here's one of a few dozen I've tried that don't work:

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names("Variance").RefersToRange.Sel ection

Thanx in advance for your assistance.

- Mike

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default edit range name

I find this syntax easier:

Range("xfd100").End(xlToLeft).name = "variance"

If you wanted to use a worksheet level name:

With activesheet
.Range("xfd100").End(xlToLeft).name = "'" & .name & "'!variance"
end with

MikeF wrote:

Should be simple, but just can't nail the syntax.

There is an existing Range Name "Variance".
Merely want whatever cell this line lands on ---
Range("xfd100").End(xlToLeft).Select
--- to become the new address of range name "Variance".

Here's one of a few dozen I've tried that don't work:

Range("xfd100").End(xlToLeft).Select
ActiveWorkbook.Names("Variance").RefersToRange.Sel ection

Thanx in advance for your assistance.

- Mike


--

Dave Peterson
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
Edit formula over a range Nate Excel Worksheet Functions 1 May 5th 09 01:57 AM
allow users to edit range Lp12 Excel Discussion (Misc queries) 0 March 21st 06 12:20 PM
Macro to edit Range Name [email protected] Excel Programming 4 January 6th 06 05:21 PM
How do I edit a selected range then copy the range into an new sheet??? dwyborn Excel Programming 2 December 16th 05 04:11 PM
How to edit a named range Wanson Excel Discussion (Misc queries) 0 December 8th 05 04:23 PM


All times are GMT +1. The time now is 08:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"