Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Search Formual Error

Hi,

I am trying search a particular character in a cell and i used "Search"
Function. Here is the formual I used but it is returning error.

=IF(OR(SEARCH("ABC",A1),SEARCH("123",A1)),"Contain s","Does not contain")

the requirement is to check 2 different characters in the cell. So I used OR
function.

Result
A B
ABC 123 Contains
ABC #VALUE!
123 #VALUE!
EL #VALUE!


The second and third row should return the value as "contains" but it is
returning error. Can anyone help me to fix this.

Thanks in advance!

Christ
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Search Formual Error

=IF(SUMPRODUCT(--ISNUMBER(SEARCH({"ABC","123"},A1))),"Contains","Do es not
contain")


"Christopher Naveen" wrote:

Hi,

I am trying search a particular character in a cell and i used "Search"
Function. Here is the formual I used but it is returning error.

=IF(OR(SEARCH("ABC",A1),SEARCH("123",A1)),"Contain s","Does not contain")

the requirement is to check 2 different characters in the cell. So I used OR
function.

Result
A B
ABC 123 Contains
ABC #VALUE!
123 #VALUE!
EL #VALUE!


The second and third row should return the value as "contains" but it is
returning error. Can anyone help me to fix this.

Thanks in advance!

Christ

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Search Formual Error

Hi,

Try this array formula (Ctrl+Shift+Enter)

=IF(OR(MID(A1,ROW($1:$100),3)="ABC",MID(A1,ROW($1: $100),3)="123"),"Contains","Not")

Please let me know how this works.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Christopher Naveen" wrote in
message ...
Hi,

I am trying search a particular character in a cell and i used "Search"
Function. Here is the formual I used but it is returning error.

=IF(OR(SEARCH("ABC",A1),SEARCH("123",A1)),"Contain s","Does not contain")

the requirement is to check 2 different characters in the cell. So I used
OR
function.

Result
A B
ABC 123 Contains
ABC #VALUE!
123 #VALUE!
EL #VALUE!


The second and third row should return the value as "contains" but it is
returning error. Can anyone help me to fix this.

Thanks in advance!

Christ


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Search Formual Error

Try this:

=IF(OR(ISNUMBER(SEARCH({"abc",123},A1))),"contains ","does not contain")

Copy down as needed

--
Biff
Microsoft Excel MVP


"Christopher Naveen" wrote in
message ...
Hi,

I am trying search a particular character in a cell and i used "Search"
Function. Here is the formual I used but it is returning error.

=IF(OR(SEARCH("ABC",A1),SEARCH("123",A1)),"Contain s","Does not contain")

the requirement is to check 2 different characters in the cell. So I used
OR
function.

Result
A B
ABC 123 Contains
ABC #VALUE!
123 #VALUE!
EL #VALUE!


The second and third row should return the value as "contains" but it is
returning error. Can anyone help me to fix this.

Thanks in advance!

Christ



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Search Formual Error

=IF(OR(ISNUMBER(SEARCH({"abc",123},A1))),"contain s","does not contain")

A few keystrokes shorter:

=IF(COUNT(SEARCH({"abc",123},A1)),"contains","does not contain")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Try this:

=IF(OR(ISNUMBER(SEARCH({"abc",123},A1))),"contains ","does not contain")

Copy down as needed

--
Biff
Microsoft Excel MVP


"Christopher Naveen" wrote
in message ...
Hi,

I am trying search a particular character in a cell and i used "Search"
Function. Here is the formual I used but it is returning error.

=IF(OR(SEARCH("ABC",A1),SEARCH("123",A1)),"Contain s","Does not contain")

the requirement is to check 2 different characters in the cell. So I used
OR
function.

Result
A B
ABC 123 Contains
ABC #VALUE!
123 #VALUE!
EL #VALUE!


The second and third row should return the value as "contains" but it is
returning error. Can anyone help me to fix this.

Thanks in advance!

Christ





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
IsError error on Search MFINE Excel Discussion (Misc queries) 6 August 28th 07 05:26 PM
WHAT DOES FORMUAL =C8+ 15 DO Tara Excel Discussion (Misc queries) 1 January 4th 07 03:38 PM
Set Formual Winnie Excel Discussion (Misc queries) 2 November 13th 06 09:47 AM
Error handling in a search michaelberrier Excel Discussion (Misc queries) 2 May 21st 06 07:08 PM
The search key was not found error Nydia New Users to Excel 0 April 27th 05 03:09 PM


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