Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programatically nameing ranges

I have a list in Cells A1:A(x)and C1:C(x)where (x) can
change, I know (x).

How do I programatically Name the Range

Thanks

Adam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Programatically nameing ranges


Range("A1:A" & x).Name = "range1"

Range("C1:C" & x).Name = "range2"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Adam Ward" wrote in message
...
I have a list in Cells A1:A(x)and C1:C(x)where (x) can
change, I know (x).

How do I programatically Name the Range

Thanks

Adam



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Programatically nameing ranges

Thanks

But I also want the final named range to refer ,by one
name to all the cells in A1:A(x) and C1:C(x) but when I
do that

Range("A1:A" & (x), "C1:C" & (x)).Name = "range3"

I get returned A1:C(x)

I'm probably being very stupid here!

Adam
-----Original Message-----

Range("A1:A" & x).Name = "range1"

Range("C1:C" & x).Name = "range2"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Adam Ward" wrote in message
...
I have a list in Cells A1:A(x)and C1:C(x)where (x) can
change, I know (x).

How do I programatically Name the Range

Thanks

Adam



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Programatically nameing ranges

Adam,

Give this a try then

Union(Range("A1:A" & x), Range("C1:C" & x)).Name = "Bob1"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
Thanks


But I also want the final named range to refer ,by one
name to all the cells in A1:A(x) and C1:C(x) but when I
do that

Range("A1:A" & (x), "C1:C" & (x)).Name = "range3"

I get returned A1:C(x)

I'm probably being very stupid here!

Adam
-----Original Message-----

Range("A1:A" & x).Name = "range1"

Range("C1:C" & x).Name = "range2"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Adam Ward" wrote in message
...
I have a list in Cells A1:A(x)and C1:C(x)where (x) can
change, I know (x).

How do I programatically Name the Range

Thanks

Adam



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Programatically nameing ranges

One of a few ways:

x = 10
Union([A1].Resize(x), [C1].Resize(x)).Name = "MyName"

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Adam Ward" wrote in message
...
I have a list in Cells A1:A(x)and C1:C(x)where (x) can
change, I know (x).

How do I programatically Name the Range

Thanks

Adam



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
Nameing scattered data in chart (dot's) NielsChr Charts and Charting in Excel 10 March 9th 10 11:16 AM
nameing a worksheet Lost Excel Discussion (Misc queries) 2 April 23rd 09 08:03 AM
Nameing cells in workbook Mike Busch[_2_] Excel Discussion (Misc queries) 3 October 6th 08 10:59 PM
column nameing PAUL~H~UK Excel Discussion (Misc queries) 7 October 16th 06 11:36 PM
In nameing a sheet in Excel it puts a .xls] in front why? EZE Excel Discussion (Misc queries) 2 April 27th 05 04:27 AM


All times are GMT +1. The time now is 05:32 AM.

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"