PC Review


Reply
Thread Tools Rate Thread

How to detect when Find returns nothing?

 
 
=?Utf-8?B?QmVu?=
Guest
Posts: n/a
 
      26th Dec 2006
Hi all

How do I detect when the following code returns nothing, meaning when no
match is found? I need to when no match is found and then take different
action. Please share with me the code syntax to do this? Thanks.

Cells.Find(What:="xyx", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate



Ben


--

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      26th Dec 2006
See Schollar's response in:

http://groups.google.com/group/micro...06311c55e74647



--
Gary's Student


"Ben" wrote:

> Hi all
>
> How do I detect when the following code returns nothing, meaning when no
> match is found? I need to when no match is found and then take different
> action. Please share with me the code syntax to do this? Thanks.
>
> Cells.Find(What:="xyx", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
> xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
> MatchCase:=False _
> , SearchFormat:=False).Activate
>
>
>
> Ben
>
>
> --
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use FIND to find all soft returns followed by the word E =?Utf-8?B?YW1oYQ==?= Microsoft Word Document Management 1 8th Mar 2007 07:43 PM
Find method Returns =?Utf-8?B?VHJlbnQgQXJnYW50ZQ==?= Microsoft Excel Programming 3 24th Apr 2006 06:46 PM
Find Now returns "no items found" in a public folder when it should find something bramblewood Microsoft Outlook Discussion 3 9th Mar 2006 06:40 AM
How to find returns in cells =?Utf-8?B?QmlsbCBTdHVyZGV2YW50?= Microsoft Excel Worksheet Functions 1 25th Apr 2005 12:12 PM
Find Carriage Returns Bruce Microsoft Excel Misc 1 22nd Dec 2003 02:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:42 AM.