IF.........AND......THEN function?

  • Thread starter Thread starter TheRobsterUK
  • Start date Start date
T

TheRobsterUK

Hi,

I am trying to create a formula that checks to see if two condition
are true and, if they are, to perform an action

e.g.

IF (Value in cell B3 = "Hello) AND (Value in cell B4 = "World") THE
(Value in cell B5 = "It Worked!")

So basically I need excel to check the values in two cells and if the
-both- equal a -text- value that I define then to print a message i
another cell.

I don't think the IF function can do this though as it only has on
logical test. I really need an IF type function with two logical tests
or an IF function with an AND to say: IF this is true AND this is als
true, then perform this action.

Anyone got any ideas?

Cheers
-Ro
 
Another way

=IF((B3="Hello")*(B4="World"),"It worked","It failed")

--


For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
A variation just for the hell of it

=IF(B3&" "&B4="Hello World","It Worked","It didn 't work")
 
Hi,

B5: =IF(B3&B4="HelloWorld","It Worked!","")


--
Regards,
Soo Cheon Jheong
Seoul, Korea
_ _
^¢¯^
--
 
Bob Phillips said:
A variation just for the hell of it

=IF(B3&" "&B4="Hello World","It Worked","It didn 't work")
....

Too context dependent. If it were phrases to be checked, e.g., "a fine" and
"day", then B3 containing "a" and B4 containing "fine day" would satisfy
B3&" "&B4="a fine day" even thougn neither B3 = "a fine" nor B4 = "day". If
you have separate criteria for separate fields, it's usually a bad idea to
combine fields and criteria for a single test.
 
Soo Cheon Jheong said:
Hi,

B5: =IF(B3&B4="HelloWorld","It Worked!","")

What is B3 contained "HelloWo" and B4 contained "rld"? Would that really be
a match?
 
Back
Top