MrExcel Publishing
Your One Stop for Excel Tips & Solutions

IF stmt

Posted by mcarter973 on May 07, 2001 8:40 AM

Is there a way to include multiple "IF" statements w/i an argument (where both conditions have to be met)?
For example, I want to say IF A = x and IF B = y then do C + D.


Posted by Kevin James on May 07, 2001 9:16 AM



You didn't indicate a false part of the equation. That would go: ... ,C+D,[here])


Posted by IML on May 07, 2001 9:19 AM

You bet. The format would be

=IF(AND(A=x,b=y),c+d,do something else)

would return the value "yes" if both conditions are true. If one is false, it would return "no"