Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default getting the absolute range address from a dynamic named range

Hi,

i have created a dynamic NAMED range for columns of data on Sheet1.

PTA=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),CO UNTA(Sheet1!$1:$1))

I am trying to get the range address of the Named Range, into a single
cell say, A655536...

A655536=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A ),COUNTA(Sheet1!$1:$1))

i can get the First address of the range say, $A$1, using
Cell("Address", PTA), but cannot get the Last address of it.

Also, is there a way to acheive this programmatically, so that i can
then dump the address into a variable, say....External Data variable
called .Name....

..Name="Sheet1!" & Cell("contents", B65536)

PLEASE HELP ASAP.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default getting the absolute range address from a dynamic named range

Enter this tiny UDF:


Function addr(r As Range) As String
addr = r.Address
End Function

then =addr(PTA) should get you the address
--
Gary's Student


"junoon" wrote:

Hi,

i have created a dynamic NAMED range for columns of data on Sheet1.

PTA=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),CO UNTA(Sheet1!$1:$1))

I am trying to get the range address of the Named Range, into a single
cell say, A655536...

A655536=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A ),COUNTA(Sheet1!$1:$1))

i can get the First address of the range say, $A$1, using
Cell("Address", PTA), but cannot get the Last address of it.

Also, is there a way to acheive this programmatically, so that i can
then dump the address into a variable, say....External Data variable
called .Name....

..Name="Sheet1!" & Cell("contents", B65536)

PLEASE HELP ASAP.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default getting the absolute range address from a dynamic named range

Using a cell as an intermediary seems like the long way around the block.

set rng = Range("PTA")
msgbox rng(1).Address & " - " & rng(rng.count).Address



--
Regards,
Tom Ogilvy

"junoon" wrote:

Hi,

i have created a dynamic NAMED range for columns of data on Sheet1.

PTA=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),CO UNTA(Sheet1!$1:$1))

I am trying to get the range address of the Named Range, into a single
cell say, A655536...

A655536=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A ),COUNTA(Sheet1!$1:$1))

i can get the First address of the range say, $A$1, using
Cell("Address", PTA), but cannot get the Last address of it.

Also, is there a way to acheive this programmatically, so that i can
then dump the address into a variable, say....External Data variable
called .Name....

..Name="Sheet1!" & Cell("contents", B65536)

PLEASE HELP ASAP.


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
Dynamic Named Range dhstein Excel Discussion (Misc queries) 4 October 11th 09 11:15 PM
Dynamic Named Range bountifulgrace Charts and Charting in Excel 1 April 6th 06 08:39 PM
dynamic named range Steph[_3_] Excel Programming 3 March 22nd 05 02:56 PM
Address of named range pcress Excel Worksheet Functions 3 November 13th 04 08:50 AM
Named Range Cells vs. Absolute Cell Addresses Mike Short Excel Programming 4 November 29th 03 11:43 PM


All times are GMT +1. The time now is 11:42 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"