Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default getting #value! when I figure I should be getting a diff value

if =search() doesn't find it, it doesn't return a 0, it returns an error
(#value).

So you could rewrite your formula to just look for errors in both searches. (If
there are two errors, then you want an F, else put a T.

=IF(AND(ISERROR(SEARCH("live",J1&N1&R1)),
ISERROR(SEARCH("appoint",J1&N1&R1))),"F","T")

(all one cell)

Another way is to just look to see if one (or both) of the searches returned a
number:

=IF(OR(ISNUMBER(SEARCH("live",J1&N1&R1)),
ISNUMBER(SEARCH("appoint",J1&N1&R1))),"T","F")

And another way to write this is:
=IF(OR(ISNUMBER(SEARCH({"live","appoint"},J1&N1&R1 ))),"T","F")

(Yeah, I'm too lazy to type concatenate (well, except in this sentence!).)

You may even want to change J1&n1&r1 to j1&"."&n1&"."r1 just in case the values
could be concatenated (ouch, that hurt) to form one of your words.


Bruccce wrote:

I have the following

=IF(SEARCH("live",CONCATENATE(J1,N1,R1))0,"T",IF( SEARCH("appoint",CONCATENA
TE(J1,N1,R1))0,"T","F"))

in one of my cells.

What I am trying to do is to determine if cells, J,N or R have either of the
following words "live" or "appointment".
Each section seem to work OK by themselves however, when I put the test for
the appoint in the "false" spot of the first if statement, I get a #value!
even if there is an appoint in one of the 3 cells.

What would be the best way to code this?
I would also like to NOT get the #value! at all, even if neither string is
found.

Thanks
Bruce


--

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
plotting column chart whch colors the bars diff for diff comm Cathy Charts and Charting in Excel 5 March 19th 09 06:30 PM
SUMIF formula required to search for 2 diff values in 2 diff colum Lidy693 Excel Worksheet Functions 7 February 21st 09 09:45 PM
HOW TO 'BLINK' A FIGURE INSTEAD OFF BOLDING THE FIGURE Nad.Engoor Excel Worksheet Functions 3 December 30th 08 03:04 PM
how you make links between diff. cells on diff. work sheets NYC-MIKE Excel Worksheet Functions 3 February 11th 08 05:05 PM
Diff. in time justmeisall Excel Worksheet Functions 1 November 11th 04 03:24 PM


All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"