Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Testing For a RangeName | Excel Discussion (Misc queries) | |||
Confused with RangeName CellREfs | Excel Discussion (Misc queries) | |||
RangeName blocks of data | Excel Programming | |||
How to return rangename of selection with VBA | Excel Programming | |||
Concatenate RangeName for INDEX? | Excel Worksheet Functions |