Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Search Function that returns an integer not #VALUE!

Hi
I'm trying to use a logical function to search text in a cell, see
below

=IF(SEARCH("DENTAL",A3,0) = 0, IF(SEARCH("VISION",A3,0) =
0,"yes","no"),"no")


Basically I need a way to determine if the defined text exists in
string and if so return flag that record. I'm comfortable using
access instr() function but I have a large amount of non-indexed
information and I'm trying to create a rule table rather than churn
away via an ODBC connection from Access.

My problem is that the search function won't return an integer, just
#Value!. Is there a function that can look for #VALUE! I was
thinking that it might be like isNA()

I'm not stuck on using the search function so alternative solutions
are greatly appreciated.

Thanks

David Hallidy

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Search Function that returns an integer not #VALUE!

Hi David, try this:

=IF(iserror(SEARCH("DENTAL",A3,0)),"no",IF(iserror (SEARCH("VISION",A3,0)),"no","yes"))

Hope this helps.

Pete

On Mar 28, 4:15 pm, "DavidH" wrote:
Hi
I'm trying to use a logical function to search text in a cell, see
below

=IF(SEARCH("DENTAL",A3,0) = 0, IF(SEARCH("VISION",A3,0) =
0,"yes","no"),"no")

Basically I need a way to determine if the defined text exists in
string and if so return flag that record. I'm comfortable using
access instr() function but I have a large amount of non-indexed
information and I'm trying to create a rule table rather than churn
away via an ODBC connection from Access.

My problem is that the search function won't return an integer, just
#Value!. Is there a function that can look for #VALUE! I was
thinking that it might be like isNA()

I'm not stuck on using the search function so alternative solutions
are greatly appreciated.

Thanks

David Hallidy



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Search Function that returns an integer not #VALUE!

Let's see if I understand correctly

If Cell A3 contains either "Dental" or "Vision" (or both, presumably)
Return "No"
Otherwise, return "Yes"

If that's true, try this:
=IF(MAX(COUNTIF(A3,{"*Dental*","*Vision*"})),"No", "Yes")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"DavidH" wrote:

Hi
I'm trying to use a logical function to search text in a cell, see
below

=IF(SEARCH("DENTAL",A3,0) = 0, IF(SEARCH("VISION",A3,0) =
0,"yes","no"),"no")


Basically I need a way to determine if the defined text exists in
string and if so return flag that record. I'm comfortable using
access instr() function but I have a large amount of non-indexed
information and I'm trying to create a rule table rather than churn
away via an ODBC connection from Access.

My problem is that the search function won't return an integer, just
#Value!. Is there a function that can look for #VALUE! I was
thinking that it might be like isNA()

I'm not stuck on using the search function so alternative solutions
are greatly appreciated.

Thanks

David Hallidy


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
how do I put in the IF function only integer as true values? suat Excel Worksheet Functions 1 November 3rd 06 06:17 PM
Using search when it returns #VALUE! IanMcGreene Excel Worksheet Functions 1 August 15th 06 10:17 PM
What function to determine the second small integer from a list? Eric Excel Worksheet Functions 3 December 30th 05 11:56 PM
What function to determine the second small integer from a list? Eric Excel Discussion (Misc queries) 1 December 30th 05 02:05 PM
Lookup returns #NA when search value (text) has leading zeros. M-Dickey Excel Worksheet Functions 1 May 10th 05 10:26 PM


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