#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default find

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default find

You have a spelling mistake:
write xlValues instead of x1Values etc.!
Use an On Error statement, becouse Find generates an error in case of not
found.

Regards,
Stefi


€˛ranswert€¯ ezt Ć*rta:

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default find

You might try changing your 1 's to l 's . Not typing here. 1 is no the same
as l.
Also, you need not activate or select to work with your find

mycell=Range("A1:G16").find("abc", LookIn:=xLValues, LookAt:=xLWhole, _
SearchOrder:=xLByColumns).address


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ranswert" wrote in message
...
I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing
wrong?
Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default find

Thanks alot

"Stefi" wrote:

You have a spelling mistake:
write xlValues instead of x1Values etc.!
Use an On Error statement, becouse Find generates an error in case of not
found.

Regards,
Stefi


€˛ranswert€¯ ezt Ć*rta:

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default find

Hope this will help you
through Code make the selection of required range
and 'tofind' is the text you want to find

Set FoundText = Selection.Find(What:=tofind, After:=ActiveCell, LookIn _
:=xlvalues, LookAt:=xlwhole, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)

If Not FoundText Is Nothing Then
FoundText.Select
FoundCellRow = ActiveCell.Row
Else
End If





"Stefi" wrote:

You have a spelling mistake:
write xlValues instead of x1Values etc.!
Use an On Error statement, becouse Find generates an error in case of not
found.

Regards,
Stefi


€˛ranswert€¯ ezt Ć*rta:

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default find

You are welcome! Thanks for the feedback!
Stefi

€˛ranswert€¯ ezt Ć*rta:

Thanks alot

"Stefi" wrote:

You have a spelling mistake:
write xlValues instead of x1Values etc.!
Use an On Error statement, becouse Find generates an error in case of not
found.

Regards,
Stefi


€˛ranswert€¯ ezt Ć*rta:

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default find

It's not actually the .find that causes the error. It's the .activate that's
doing the damage.



Stefi wrote:

You have a spelling mistake:
write xlValues instead of x1Values etc.!
Use an On Error statement, becouse Find generates an error in case of not
found.

Regards,
Stefi

€˛ranswert€¯ ezt Ć*rta:

I am trying to write a simple "Find" Procedure that I will expand on once I
get it to work. I have:

Range("A1:G16").find(What:="abc", LookIn:=x1Values, LookAt:=x1Whole,
SearchOrder:=x1ByColumns).Activate

When I run it I get a "scpript out of range error". What am I doing wrong?
Thanks


--

Dave Peterson
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 and Replace - delete the remainder of the text in the cell after my Find [email protected] Excel Programming 4 August 4th 07 03:39 AM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
find and delete text, find a 10-digit number and put it in a textbox Paul Excel Programming 3 November 16th 04 04:21 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"