ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can you use multiple SEARCH functions in one cell (https://www.excelbanter.com/excel-worksheet-functions/173655-can-you-use-multiple-search-functions-one-cell.html)

Soulscream

Can you use multiple SEARCH functions in one cell
 
Hi,
I'm trying to write a complicated equation and I need it to search 2
different cells for the word "Sunday". I'm trying to put both in an IF
equation, but they won't both work properly. Here's my example:

=IF(SEARCH("SUNDAY",D28),"",IF(SEARCH("SUNDAY",D25 ),Z23+1,""))

In the above equation, the first function works and leaves the cell blank,
but if the search for "Sunday" is FALSE it returns a #Value! error.

....any ideas?

PCLIVE

Can you use multiple SEARCH functions in one cell
 
Try this:

=IF(ISNUMBER(SEARCH("SUNDAY",D28)),"",IF(ISNUMBER( SEARCH("SUNDAY",D25)),Z23+1,""))

HTH,
Paul


--

"Soulscream" wrote in message
...
Hi,
I'm trying to write a complicated equation and I need it to search 2
different cells for the word "Sunday". I'm trying to put both in an IF
equation, but they won't both work properly. Here's my example:

=IF(SEARCH("SUNDAY",D28),"",IF(SEARCH("SUNDAY",D25 ),Z23+1,""))

In the above equation, the first function works and leaves the cell blank,
but if the search for "Sunday" is FALSE it returns a #Value! error.

...any ideas?




Soulscream

Can you use multiple SEARCH functions in one cell
 
Hey, it worked! Thanks. Can you tell me why it won't work without the
ISNUMBER function out of curiosity?

"PCLIVE" wrote:

Try this:

=IF(ISNUMBER(SEARCH("SUNDAY",D28)),"",IF(ISNUMBER( SEARCH("SUNDAY",D25)),Z23+1,""))

HTH,
Paul


--

"Soulscream" wrote in message
...
Hi,
I'm trying to write a complicated equation and I need it to search 2
different cells for the word "Sunday". I'm trying to put both in an IF
equation, but they won't both work properly. Here's my example:

=IF(SEARCH("SUNDAY",D28),"",IF(SEARCH("SUNDAY",D25 ),Z23+1,""))

In the above equation, the first function works and leaves the cell blank,
but if the search for "Sunday" is FALSE it returns a #Value! error.

...any ideas?





Rick Rothstein \(MVP - VB\)

Can you use multiple SEARCH functions in one cell
 
SEARCH returns an error, not TRUE or FALSE, if the searched for text is not
found.

Rick


"Soulscream" wrote in message
...
Hey, it worked! Thanks. Can you tell me why it won't work without the
ISNUMBER function out of curiosity?

"PCLIVE" wrote:

Try this:

=IF(ISNUMBER(SEARCH("SUNDAY",D28)),"",IF(ISNUMBER( SEARCH("SUNDAY",D25)),Z23+1,""))

HTH,
Paul


--

"Soulscream" wrote in message
...
Hi,
I'm trying to write a complicated equation and I need it to search 2
different cells for the word "Sunday". I'm trying to put both in an IF
equation, but they won't both work properly. Here's my example:

=IF(SEARCH("SUNDAY",D28),"",IF(SEARCH("SUNDAY",D25 ),Z23+1,""))

In the above equation, the first function works and leaves the cell
blank,
but if the search for "Sunday" is FALSE it returns a #Value! error.

...any ideas?






T. Valko

Can you use multiple SEARCH functions in one cell
 
Another one:

=IF(COUNTIF(D28,"*Sunday*"),"",IF(COUNTIF(D25,"*Su nday*"),Z23+1,""))

--
Biff
Microsoft Excel MVP


"Soulscream" wrote in message
...
Hi,
I'm trying to write a complicated equation and I need it to search 2
different cells for the word "Sunday". I'm trying to put both in an IF
equation, but they won't both work properly. Here's my example:

=IF(SEARCH("SUNDAY",D28),"",IF(SEARCH("SUNDAY",D25 ),Z23+1,""))

In the above equation, the first function works and leaves the cell blank,
but if the search for "Sunday" is FALSE it returns a #Value! error.

...any ideas?





All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com