Can you use multiple SEARCH functions in one cell

  • Thread starter Thread starter Soulscream
  • Start date Start date
S

Soulscream

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?
 
Try this:

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

HTH,
Paul
 
Hey, it worked! Thanks. Can you tell me why it won't work without the
ISNUMBER function out of curiosity?
 
SEARCH returns an error, not TRUE or FALSE, if the searched for text is not
found.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top