#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Find method

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Find method

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Find method

'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

  #4   Report Post  
Posted to microsoft.public.excel.programming
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

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
Find Method Help in VBA TC[_10_] Excel Programming 4 February 10th 12 05:57 AM
xls vba find method to find row that contains the current date RCranston Excel Programming 3 March 28th 07 03:59 PM
Find Method Snowy Excel Programming 2 February 16th 06 05:48 AM
date find using find method x taol Excel Programming 2 December 22nd 05 09:51 AM
Using variables to make a date and using find method to find that. KyWilde Excel Programming 2 April 21st 05 09:43 PM


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