Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2007

Tip: Looking for answers? Try searching our database.

Defining a range using defined names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Wilkinson - 17 May 2007 12:53 GMT
Hi I have a range that that starts at
$A$2 which is named "dataStart" and ends with
$A$10 which is named "DataEnd".

I want to create a named range using the defined names, e.g
dataList refers to =dataStart:DataEnd
except that the above syntax does not work. can someone tell me the correct
syntax for this, as I don't want to use =$A$2:$A$10. The values for dataStart
and dataEnd may change which is why I do not want to hard code them.

Thanks,
Chris
Vergel Adriano - 17 May 2007 13:19 GMT
Chris,

try this

=OFFSET(INDIRECT(ADDRESS(ROW(DataStart),
COLUMN(DataStart))),0,0,ROW(DataEnd)-ROW(DataStart)+1,COLUMN(DataEnd)-COLUMN(DataStart)+1)

Signature

Hope that helps.

Vergel Adriano

> Hi I have a range that that starts at
> $A$2 which is named "dataStart" and ends with
[quoted text clipped - 8 lines]
> Thanks,
> Chris
p45cal - 17 May 2007 14:21 GMT
Or
=INDIRECT(ADDRESS(ROW(datastart),COLUMN(datastart)) & ":" &
ADDRESS(ROW(dataend),COLUMN(dataend)))
Signature

p45cal

> Chris,
>
[quoted text clipped - 15 lines]
> > Thanks,
> > Chris
Gary''s Student - 17 May 2007 13:32 GMT
Sub chris()
Set rs = Range("datastart")
Set re = Range("dataEnd")
Set rt = Range(rs, re)
MsgBox (rt.Address)
rt.Name = "datalist"
End Sub

Signature

Gary''s Student - gsnu200722

Bob Phillips - 17 May 2007 13:52 GMT
Set myRange = Range(Range("DataStart"),Range("DataEnd"))

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi I have a range that that starts at
> $A$2 which is named "dataStart" and ends with
[quoted text clipped - 10 lines]
> Thanks,
> Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.