Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define a Range based on a Range object
Given a Range object (e.g: set xRange = Range("C1:D10") ) 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("C5:D10") ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define a Range based on a Range object
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" wrote in message ... Given a Range object (e.g: set xRange = Range("C1:D10") ) 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("C5:D10") ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define a Range based on a Range object
On Oct 14, 11:40*pm, "Rick Rothstein"
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" wrote in message ... Given a Range object (e.g: set xRange = *Range("C1:D10") ) 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("C5:D10") ? yes thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define a Range based on a Range object
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" wrote in message ... On Oct 14, 11:40 pm, "Rick Rothstein" 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" wrote in message ... Given a Range object (e.g: set xRange = Range("C1:D10") ) 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("C5:D10") ? yes thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define a Range based on a Range object
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("C1:D10") 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" wrote in message ... 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" wrote in message ... On Oct 14, 11:40 pm, "Rick Rothstein" 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" wrote in message ... Given a Range object (e.g: set xRange = Range("C1:D10") ) 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("C5:D10") ? yes thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to define a charts range based on the value of a cell | Excel Discussion (Misc queries) | |||
How to define a range based on first and last cells with data? | Excel Programming | |||
Define a range based on another named range | Excel Worksheet Functions | |||
Define a Dynamic Range Based on an Index | Excel Programming | |||
problem using Set statement to define range object | Excel Programming |