Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default SEARCH function returning #VALUE! error

I'm trying to use an IF statement with my SEARCH function so that if a "-" is
found I will do one thing but if it is not found it will do something else.

However, the statement bombs when there is no "-" found. It returns the
#VALUE! and it no longer evaluates my IF expression. It just stops and
returns the error value instead of giving it the value I put in the IF
statement for false.

Anyone know how to get around that?
my test statement looks like this:
=IF(SEARCH("-",B178) 0, "True", "FALSE")

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default SEARCH function returning #VALUE! error

=IF(ISNUMBER(SEARCH("-",B178)), "True", "FALSE")
or if you want a logical rather than text
=ISNUMBER(SEARCH("-",B178))
--
David Biddulph

jhchan wrote:
I'm trying to use an IF statement with my SEARCH function so that if
a "-" is found I will do one thing but if it is not found it will do
something else.

However, the statement bombs when there is no "-" found. It returns
the #VALUE! and it no longer evaluates my IF expression. It just
stops and returns the error value instead of giving it the value I
put in the IF statement for false.

Anyone know how to get around that?
my test statement looks like this:
=IF(SEARCH("-",B178) 0, "True", "FALSE")



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
LookUp Function with Two Column Search Returning One Column Value insitedge Excel Worksheet Functions 8 March 3rd 08 05:59 AM
Vlookup Function returning #N/A error for two entries rtjeter Excel Discussion (Misc queries) 2 August 2nd 06 04:58 PM
GetPivotData function returning N/A error for some rows Hari Excel Discussion (Misc queries) 1 May 15th 06 07:29 AM
FIND or SEARCH Returning Erroneous #VALUE? Patrick McDonald Excel Worksheet Functions 3 October 5th 05 06:27 PM
Custom function returning VALUE error alex.k Excel Discussion (Misc queries) 6 September 27th 05 03:05 AM


All times are GMT +1. The time now is 04:08 PM.

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"