ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If then question (https://www.excelbanter.com/excel-discussion-misc-queries/155482-if-then-question.html)

Sung

If then question
 

Column A Column B
A -
VOA C
OA C
VA Y
VO -
VO C

I want a formula which will return a 1 if there is an "A" in column A and is
not "-" in column B nad a zero if both those conditions are not met. So in
the example above, the 2nd, 3rd, and 4th rows would return a 1 and the 1st,
5th, and 6th rows would return a 0.

Help please.

Elkar

If then question
 
Try this:

=IF(OR(ISERROR(FIND("A",A1)),B1="-"),0,1)

HTH,
Elkar


"Sung" wrote:


Column A Column B
A -
VOA C
OA C
VA Y
VO -
VO C

I want a formula which will return a 1 if there is an "A" in column A and is
not "-" in column B nad a zero if both those conditions are not met. So in
the example above, the 2nd, 3rd, and 4th rows would return a 1 and the 1st,
5th, and 6th rows would return a 0.

Help please.


Toppers

If then question
 
in column c:

=IF(AND(ISNUMBER(FIND("A",A2)),B2<"-"),1,0)

HTH

"Sung" wrote:


Column A Column B
A -
VOA C
OA C
VA Y
VO -
VO C

I want a formula which will return a 1 if there is an "A" in column A and is
not "-" in column B nad a zero if both those conditions are not met. So in
the example above, the 2nd, 3rd, and 4th rows would return a 1 and the 1st,
5th, and 6th rows would return a 0.

Help please.


Sung

If then question
 
Thanks to both of you for your help.

"Sung" wrote:


Column A Column B
A -
VOA C
OA C
VA Y
VO -
VO C

I want a formula which will return a 1 if there is an "A" in column A and is
not "-" in column B nad a zero if both those conditions are not met. So in
the example above, the 2nd, 3rd, and 4th rows would return a 1 and the 1st,
5th, and 6th rows would return a 0.

Help please.



All times are GMT +1. The time now is 08:49 PM.

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