Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default How to detect when Find returns nothing?

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


--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to detect when Find returns nothing?

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
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 function returns the #VALUE! error value Ken Excel Discussion (Misc queries) 2 October 29th 06 01:59 AM
Find method Returns Trent Argante Excel Programming 3 April 24th 06 06:46 PM
how to find returns for lump sum & yearly investments jackoat Excel Worksheet Functions 1 August 26th 05 08:19 PM
How to find returns in cells Bill Sturdevant Excel Worksheet Functions 1 April 25th 05 12:12 PM
Find Next in a selection, how to stop it when it returns to the fi Ron de Bruin Excel Programming 0 August 4th 04 02:47 PM


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