Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Range within another Range

Howdy,

I have two ranges (smallRange and bigRange) that I am working with, both are
1 column wide and variable (dynamic) in length but bigRange is always longer
than smallRange.

Now for the twist, the values in the smallRange refer to the row in the
bigRange, and I want the value from the bigRange. Any thoughts/suggestions

Regards,
Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Range within another Range

Not sure what you mean by "refer to". You can refer to individual
cells in a range using
bigRange.cells(x)

if that's what you're after. Since they are single-column ranges
cells(5) will be the fifth row. If this doesn't help maybe you can
provide more details.

Tim.






"tim" wrote in message
...
Howdy,

I have two ranges (smallRange and bigRange) that I am working with,
both are
1 column wide and variable (dynamic) in length but bigRange is
always longer
than smallRange.

Now for the twist, the values in the smallRange refer to the row in
the
bigRange, and I want the value from the bigRange. Any
thoughts/suggestions

Regards,
Tim



  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Range within another Range

Tim

Thanks for the feedback. What I mean is best illustrated by an example.
smallRange
1
5
10

bigRange
84
63
215
500
1
12
78
105
53
6

For the three smallRange values, I want the value from the bigRange
(84,1,6). The smallRange value is the row in the bigRange where the value
that I want resides.

HTH

regards
Tim


"Tim Williams" wrote:

Not sure what you mean by "refer to". You can refer to individual
cells in a range using
bigRange.cells(x)

if that's what you're after. Since they are single-column ranges
cells(5) will be the fifth row. If this doesn't help maybe you can
provide more details.

Tim.






"tim" wrote in message
...
Howdy,

I have two ranges (smallRange and bigRange) that I am working with,
both are
1 column wide and variable (dynamic) in length but bigRange is
always longer
than smallRange.

Now for the twist, the values in the smallRange refer to the row in
the
bigRange, and I want the value from the bigRange. Any
thoughts/suggestions

Regards,
Tim




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Range within another Range

As per TW reply:

Sub RangeWithinRange()

Set smallRange = Range("smallrange")
Set bigRange = Range("bigrange")

For Each cell In smallRange
MsgBox bigRange.Cells(cell.Value)
Next

End Sub

HTH.


tim wrote:
Tim

Thanks for the feedback. What I mean is best illustrated by an

example.
smallRange
1
5
10

bigRange
84
63
215
500
1
12
78
105
53
6

For the three smallRange values, I want the value from the bigRange
(84,1,6). The smallRange value is the row in the bigRange where the

value
that I want resides.

HTH

regards
Tim


"Tim Williams" wrote:

Not sure what you mean by "refer to". You can refer to individual


cells in a range using
bigRange.cells(x)

if that's what you're after. Since they are single-column ranges
cells(5) will be the fifth row. If this doesn't help maybe you can


provide more details.

Tim.






"tim" wrote in message
...
Howdy,

I have two ranges (smallRange and bigRange) that I am working

with,
both are
1 column wide and variable (dynamic) in length but bigRange is
always longer
than smallRange.

Now for the twist, the values in the smallRange refer to the row

in
the
bigRange, and I want the value from the bigRange. Any
thoughts/suggestions

Regards,
Tim





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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


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