Jobie
Jobie

Reputation: 1

Multiple text conditions in IF statement in Excel

I need to do this: If D2 equals "yes" and E2 equals "no" then return "ok" in `F2.
I am having trouble with checking 2 different cells for text as part of an if statement. How can I do this or something with similar results?

Upvotes: 0

Views: 1165

Answers (3)

rala
rala

Reputation: 897

try in F2:

=IF(AND(D2="yes"; E2="no"); "ok"; "not ok")

based on docs: AND()

otherwise you could nest if checks of course (look at other answer)

Upvotes: 1

Glitch_Doctor
Glitch_Doctor

Reputation: 3034

You can use AND(condition1,condition2) or nested IF's:

=IF(AND(D2="yes",E2="no"),"ok","not ok")

=IF(D2<>"yes","not ok",IF(E2="no","ok","not ok"))

Upvotes: 0

waka
waka

Reputation: 3407

You could try and nest the if-statements:

=IF(D2="yes";(IF(E2="no";"OK";"");"")

Upvotes: 0

Related Questions