ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   IF Statement (https://www.excelbanter.com/new-users-excel/233330-if-statement.html)

HS[_2_]

IF Statement
 
Someone gave me some great ideas but I can't seem to make them work
=IF(COUNT(B1:C1)=2,"N","Y")
OR
=IF(AND(B10,C10),"N","Y")
If two blanks to be ignored
=IF(AND(ISBLANK(B1),ISBLANK(C1),"",IF(COUNT(B1:C1) =2,"N","Y"))


what I have are three columns with $$$ in them and I need to tag them when
there is a value in only one of them with a Y

for example I need to populate Column D with a Y when Column B is the only
one populated


Column A Column B Column C Column D
190 150 90 N
100 Y

Luke M

IF Statement
 
Something like this should work:

=IF(AND(ISBLANK(A2),ISBLANK(C2),NOT(ISBLANK(B2))), "Y","N")
if you're checking for blanks. If A & C are populated by formulas, maybe the
variation will work:

=IF(AND(A2=0,C2=0,B20),"Y","N")

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"HS" wrote:

Someone gave me some great ideas but I can't seem to make them work
=IF(COUNT(B1:C1)=2,"N","Y")
OR
=IF(AND(B10,C10),"N","Y")
If two blanks to be ignored
=IF(AND(ISBLANK(B1),ISBLANK(C1),"",IF(COUNT(B1:C1) =2,"N","Y"))


what I have are three columns with $$$ in them and I need to tag them when
there is a value in only one of them with a Y

for example I need to populate Column D with a Y when Column B is the only
one populated


Column A Column B Column C Column D
190 150 90 N
100 Y


H

IF Statement
 

thank you, this is great! :)
"Luke M" wrote:

Something like this should work:

=IF(AND(ISBLANK(A2),ISBLANK(C2),NOT(ISBLANK(B2))), "Y","N")
if you're checking for blanks. If A & C are populated by formulas, maybe the
variation will work:

=IF(AND(A2=0,C2=0,B20),"Y","N")

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"HS" wrote:

Someone gave me some great ideas but I can't seem to make them work
=IF(COUNT(B1:C1)=2,"N","Y")
OR
=IF(AND(B10,C10),"N","Y")
If two blanks to be ignored
=IF(AND(ISBLANK(B1),ISBLANK(C1),"",IF(COUNT(B1:C1) =2,"N","Y"))


what I have are three columns with $$$ in them and I need to tag them when
there is a value in only one of them with a Y

for example I need to populate Column D with a Y when Column B is the only
one populated


Column A Column B Column C Column D
190 150 90 N
100 Y


Gord Dibben

IF Statement
 
=IF(COUNT(A1:C1)=1,"Y","N") entered in D1 and copied down.

Will return a "Y" if only one of the cells in A1:C1 is populated.


Gord Dibben MS Excel MVP

On Tue, 9 Jun 2009 10:35:01 -0700, HS wrote:

Someone gave me some great ideas but I can't seem to make them work
=IF(COUNT(B1:C1)=2,"N","Y")
OR
=IF(AND(B10,C10),"N","Y")
If two blanks to be ignored
=IF(AND(ISBLANK(B1),ISBLANK(C1),"",IF(COUNT(B1:C1) =2,"N","Y"))


what I have are three columns with $$$ in them and I need to tag them when
there is a value in only one of them with a Y

for example I need to populate Column D with a Y when Column B is the only
one populated


Column A Column B Column C Column D
190 150 90 N
100 Y




All times are GMT +1. The time now is 07:03 AM.

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