Thread: Find method
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Find method

'text1' is a literal which is found in some cells within range1.
range1.find("text1") returns returns a range object consisting of one cell,
which is the first one among those in which 'text1' was found.
Reference (address) to this cell is a property of this one cell range, e.g.
range1.find("text1").address(false,false) is its relative address.

Regards,
Stefi

€žSajit€ť ezt Ă*rta:

'text1' is a literal within the range1 that the expression finds. Is the
literal called as the range object? I thought the range object will be a
reference to the cell in which the literal was found.

Thanks Stefi,
--
Sajit
Abu Dhabi


"Stefi" wrote:

1. Find method returns a range object as it's stated in Help, not its address
or row No. You can access a property of the range object with
range1.find("text1").row

2. range1.find("text1").row - range1.row

Regards,
Stefi

€žSajit€ť ezt Ă*rta:

The help for the find method tells me,

"Finds specific information in a range, and returns a Range object that
represents the first cell where that information is found. Returns Nothing if
no match is found. Doesnt affect the selection or the active cell."

But I see that the result of the find in the expression,

range1.find("text1")

finds the text1 string itself and not the cell reference. For this I have to
have,

range1.find("text1").row

however this returns the absolute row reference and not relative to the range.

1) Why does not the find method return a result as in the help?
2) How do I get a row reference relative to the range?

--
Sajit
Abu Dhabi