Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rk Rk is offline
external usenet poster
 
Posts: 18
Default handling calculated excel cell error messages

When I try finding a text string within another test string (for exmaple
using "find" or "Search") it returns a value when the text string is found.
However, when the text string is not found it returns an Error ("#Value!").
I'd like to autmatically calulate the cell as "Y" if the text string was
found or "N" if it was not found.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default handling calculated excel cell error messages

Use instr inplace of find or before search

if instr(string1,",") 0 then
'put find or search here
end if

"RK" wrote:

When I try finding a text string within another test string (for exmaple
using "find" or "Search") it returns a value when the text string is found.
However, when the text string is not found it returns an Error ("#Value!").
I'd like to autmatically calulate the cell as "Y" if the text string was
found or "N" if it was not found.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default handling calculated excel cell error messages

=if(iserror(search(...)),"N","Y")
or:
=if(isnumber(search(...)),"Y","N")


RK wrote:

When I try finding a text string within another test string (for exmaple
using "find" or "Search") it returns a value when the text string is found.
However, when the text string is not found it returns an Error ("#Value!").
I'd like to autmatically calulate the cell as "Y" if the text string was
found or "N" if it was not found.


--

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
Handling #NUM! error Michel Khennafi Excel Worksheet Functions 1 February 26th 07 08:49 PM
Excel Error messages when making lables Befuddled Excel Discussion (Misc queries) 1 December 15th 06 01:00 AM
Error handling in a search michaelberrier Excel Discussion (Misc queries) 2 May 21st 06 07:08 PM
I get error messages in Excel cells once I save a file JeffJake Excel Worksheet Functions 1 November 28th 05 11:06 PM
Error handling in this code L. Howard Kittle Excel Discussion (Misc queries) 4 October 8th 05 12:35 PM


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