ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Then statement (https://www.excelbanter.com/excel-worksheet-functions/14446-if-then-statement.html)

alm09

If Then statement
 
Is it possible to have an "AND" condition in an "If Then" statement?

For example, how would you write "if cell A1 and C1 and E1 all equal "x",
then return "yes". If not, return "no".

Peo Sjoblom

=IF(AND(A1="x",C1="x",E1="x"),"yes","no")

--

Regards,

Peo Sjoblom


"alm09" wrote in message
...
Is it possible to have an "AND" condition in an "If Then" statement?

For example, how would you write "if cell A1 and C1 and E1 all equal "x",
then return "yes". If not, return "no".





All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com