Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Finding Row Numbers Within the RangeName

Im a bit confused about this. I have a RangeName Table. I want to Find the
row which say "Blue" is in ( Relative to the range ) so

myRangeName.Find("Green") ' returns a range absolute to the spreadsheet,
this is no good to
me because I want to refer to the table using the Cells property. such as
..Cells('FoundRowNum,9) to get the adjacent value to Green. Whats the
simplest way to do this ?

Activity LookupValue
Blue 7
Green 9
Red 12





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Finding Row Numbers Within the RangeName

Try a diferent approach:
Dim r As Range
Set r = MyRange.Find('Whatever)
MsgBox r.Offset(,1)
--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

Im a bit confused about this. I have a RangeName Table. I want to Find the
row which say "Blue" is in ( Relative to the range ) so

myRangeName.Find("Green") ' returns a range absolute to the spreadsheet,
this is no good to
me because I want to refer to the table using the Cells property. such as
..Cells('FoundRowNum,9) to get the adjacent value to Green. Whats the
simplest way to do this ?

Activity LookupValue
Blue 7
Green 9
Red 12






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Finding Row Numbers Within the RangeName

OK, Lateral thinking is good, but what If I have the following scenario ?
When I find(2) I will return column ?



Col1 Col2
1 2
2 3
3 6
4 5



"Charles Chickering" wrote in
message ...
Try a diferent approach:
Dim r As Range
Set r = MyRange.Find('Whatever)
MsgBox r.Offset(,1)
--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

Im a bit confused about this. I have a RangeName Table. I want to Find
the
row which say "Blue" is in ( Relative to the range ) so

myRangeName.Find("Green") ' returns a range absolute to the
spreadsheet,
this is no good to
me because I want to refer to the table using the Cells property. such as
..Cells('FoundRowNum,9) to get the adjacent value to Green. Whats the
simplest way to do this ?

Activity LookupValue
Blue 7
Green 9
Red 12








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Finding Row Numbers Within the RangeName

I'm not sure what you're asking here. If you're worried about what column you
find the data in then limit the search
Set r = MyRange.Columns(1).Find('Whatever)

--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

OK, Lateral thinking is good, but what If I have the following scenario ?
When I find(2) I will return column ?



Col1 Col2
1 2
2 3
3 6
4 5



"Charles Chickering" wrote in
message ...
Try a diferent approach:
Dim r As Range
Set r = MyRange.Find('Whatever)
MsgBox r.Offset(,1)
--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

Im a bit confused about this. I have a RangeName Table. I want to Find
the
row which say "Blue" is in ( Relative to the range ) so

myRangeName.Find("Green") ' returns a range absolute to the
spreadsheet,
this is no good to
me because I want to refer to the table using the Cells property. such as
..Cells('FoundRowNum,9) to get the adjacent value to Green. Whats the
simplest way to do this ?

Activity LookupValue
Blue 7
Green 9
Red 12









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Finding Row Numbers Within the RangeName

Thats fine, I found you could alter the search by columns or row, so thats
solved it

Cheers



"Charles Chickering" wrote in
message ...
I'm not sure what you're asking here. If you're worried about what column
you
find the data in then limit the search
Set r = MyRange.Columns(1).Find('Whatever)

--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

OK, Lateral thinking is good, but what If I have the following scenario ?
When I find(2) I will return column ?



Col1 Col2
1 2
2 3
3 6
4 5



"Charles Chickering" wrote
in
message ...
Try a diferent approach:
Dim r As Range
Set r = MyRange.Find('Whatever)
MsgBox r.Offset(,1)
--
Charles Chickering

"A good example is twice the value of good advice."


"Goofy" wrote:

Im a bit confused about this. I have a RangeName Table. I want to Find
the
row which say "Blue" is in ( Relative to the range ) so

myRangeName.Find("Green") ' returns a range absolute to the
spreadsheet,
this is no good to
me because I want to refer to the table using the Cells property. such
as
..Cells('FoundRowNum,9) to get the adjacent value to Green. Whats the
simplest way to do this ?

Activity LookupValue
Blue 7
Green 9
Red 12











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
Testing For a RangeName JCS Excel Discussion (Misc queries) 3 August 13th 08 01:08 PM
Confused with RangeName CellREfs Jim May Excel Discussion (Misc queries) 1 October 22nd 06 11:11 PM
RangeName blocks of data CLR Excel Programming 7 March 3rd 06 05:57 PM
How to return rangename of selection with VBA shoba Excel Programming 1 June 27th 05 04:12 PM
Concatenate RangeName for INDEX? CLR Excel Worksheet Functions 5 November 30th 04 07:47 PM


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