PC Review


Reply
Thread Tools Rate Thread

Define a Range based on a Range object

 
 
Terry
Guest
Posts: n/a
 
      15th Oct 2010

Given a Range object (e.g: set xRange = Range("C110") )

And given xRow = 5 , which stands for Row 5 (absolute Row index)

How to define a range "yRange" based on "xRange" so that yRange is
Range("C510") ?
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      15th Oct 2010
I just posted a response to this same question over in the Microsoft forum
(I'm assuming you posted it there as the ranges look familiar).

--
Rick Rothstein (MVP - Excel)


"Terry" <(E-Mail Removed)> wrote in message
news:565ed3ac-e74d-457c-bd6c-(E-Mail Removed)...
>
> Given a Range object (e.g: set xRange = Range("C110") )
>
> And given xRow = 5 , which stands for Row 5 (absolute Row index)
>
> How to define a range "yRange" based on "xRange" so that yRange is
> Range("C510") ?


 
Reply With Quote
 
Terry
Guest
Posts: n/a
 
      15th Oct 2010
On Oct 14, 11:40*pm, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> I just posted a response to this same question over in the Microsoft forum
> (I'm assuming you posted it there as the ranges look familiar).
>
> --
> Rick Rothstein (MVP - Excel)
>
> "Terry" <webtour...@gmail.com> wrote in message
>
> news:565ed3ac-e74d-457c-bd6c-(E-Mail Removed)...
>
>
>
> > Given a Range object (e.g: set xRange = *Range("C110") )

>
> > And given xRow = 5 , which stands for Row 5 (absolute Row index)

>
> > How to define a range "yRange" based on "xRange" so that yRange is
> > Range("C510") ?




yes thanks
 
Reply With Quote
 
CompleteNewb
Guest
Posts: n/a
 
      17th Oct 2010
Can you guys either copy the response here or give a link to the post in the
other newsgroup? I searched the Microsoft forums for both you guys as
authors, as well as looking for the subject line and the range reference
text, and found nothing.

And this seems like a question that's totally related to things I'm having
issues with now.

Thanks.

"Terry" <(E-Mail Removed)> wrote in message
news:abfa0efc-5d3d-47fe-a27f-(E-Mail Removed)...
On Oct 14, 11:40 pm, "Rick Rothstein"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> I just posted a response to this same question over in the Microsoft forum
> (I'm assuming you posted it there as the ranges look familiar).
>
> --
> Rick Rothstein (MVP - Excel)
>
> "Terry" <webtour...@gmail.com> wrote in message
>
> news:565ed3ac-e74d-457c-bd6c-(E-Mail Removed)...
>
>
>
> > Given a Range object (e.g: set xRange = Range("C110") )

>
> > And given xRow = 5 , which stands for Row 5 (absolute Row index)

>
> > How to define a range "yRange" based on "xRange" so that yRange is
> > Range("C510") ?




yes thanks

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      25th Oct 2010
Sorry for the delay in responding (I don't visit the newsgroups that often
anymore). Here is a link to the thread I mentioned...

http://social.answers.microsoft.com/...7-d22f6dca8a92

but to save you the time of searching it out, here is what I responded over
there...

Consider this...

Dim xRange As Range, yRange As Range, NewRowBeginning As Long
NewRowBeginning = 5
Set xRange = Range("C110")
Set yRange = Intersect(xRange, Range(NewRowBeginning & ":" & Rows.Count))
'
' Test to see if the range came out right
'
If Not yRange Is Nothing Then
MsgBox yRange.Address(0, 0)
Else
MsgBox "The specified new row beginning is located below the specified
range"
End If

--
Rick Rothstein (MVP - Excel)



"CompleteNewb" <(E-Mail Removed)> wrote in message
news:i9f0om$dpr$(E-Mail Removed)...
> Can you guys either copy the response here or give a link to the post in
> the other newsgroup? I searched the Microsoft forums for both you guys as
> authors, as well as looking for the subject line and the range reference
> text, and found nothing.
>
> And this seems like a question that's totally related to things I'm having
> issues with now.
>
> Thanks.
>
> "Terry" <(E-Mail Removed)> wrote in message
> news:abfa0efc-5d3d-47fe-a27f-(E-Mail Removed)...
> On Oct 14, 11:40 pm, "Rick Rothstein"
> <rick.newsNO.S...@NO.SPAMverizon.net> wrote:
>> I just posted a response to this same question over in the Microsoft
>> forum
>> (I'm assuming you posted it there as the ranges look familiar).
>>
>> --
>> Rick Rothstein (MVP - Excel)
>>
>> "Terry" <webtour...@gmail.com> wrote in message
>>
>> news:565ed3ac-e74d-457c-bd6c-(E-Mail Removed)...
>>
>>
>>
>> > Given a Range object (e.g: set xRange = Range("C110") )

>>
>> > And given xRow = 5 , which stands for Row 5 (absolute Row index)

>>
>> > How to define a range "yRange" based on "xRange" so that yRange is
>> > Range("C510") ?

>
>
>
> yes thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to define a charts range based on the value of a cell chris Microsoft Excel Misc 1 2nd Dec 2009 04:34 PM
How to define a range based on first and last cells with data? =?Utf-8?B?RGVubmlz?= Microsoft Excel Programming 5 1st Mar 2006 01:45 PM
Define a range based on another named range =?Utf-8?B?QmFzaWw=?= Microsoft Excel Worksheet Functions 2 21st Feb 2005 01:47 PM
Define Range based on cell color =?Utf-8?B?U3RlcGhhbmllSA==?= Microsoft Excel Programming 4 15th Dec 2004 03:53 PM
Define a Dynamic Range Based on an Index Mike Roberto Microsoft Excel Programming 4 5th Aug 2004 02:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:59 PM.