ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help to fix formula ="Yes" (https://www.excelbanter.com/excel-worksheet-functions/9058-help-fix-formula-%3D%22yes%22.html)

Pat

Help to fix formula ="Yes"
 

The following formula is not doing what it is supposed to be doing:

=IF(AND(I87-J870,S87="Yes"),0,I87-J87)

A value should only be returned if S87="Yes"

What happens is a value is returned regardless if S87="Yes" or not. Anyone
know what is wrong here?

Thanks
Pat



peter

Hi,
the "yes" in the formula needs to be double quoted...
the yes in cell s87 does not.

peter
-----Original Message-----

The following formula is not doing what it is supposed

to be doing:

=IF(AND(I87-J870,S87="Yes"),0,I87-J87)

A value should only be returned if S87="Yes"

What happens is a value is returned regardless if

S87="Yes" or not. Anyone
know what is wrong here?

Thanks
Pat


.


Pat

Peter,
What through the formula is that the cell had been custom formatted. I have
now changed the formula to:
=IF(AND(I87-J870,S87=1),0,I87-J87)
Thanks



"peter" wrote in message
...
Hi,
the "yes" in the formula needs to be double quoted...
the yes in cell s87 does not.

peter
-----Original Message-----

The following formula is not doing what it is supposed

to be doing:

=IF(AND(I87-J870,S87="Yes"),0,I87-J87)

A value should only be returned if S87="Yes"

What happens is a value is returned regardless if

S87="Yes" or not. Anyone
know what is wrong here?

Thanks
Pat


.





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

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