Maybe this is a simple question

  • Thread starter Thread starter www
  • Start date Start date
W

www

Hi all,

I would like to know how to achieve the following task.

If A1 cell is Y, and I would like to set B1 as 0.
If A2 cell is N, and I would like to set B2 as 1.


A1=Y, And then I want to set B1 as 0.
A2=N, And then I want to set B2 as 1.

Thanks in advance,
newbie
 
Hi all,

I would like to know how to achieve the following task.

If A1 cell is Y, and I would like to set B1 as 0.
If A2 cell is N, and I would like to set B2 as 1.


A1=Y, And then I want to set B1 as 0.
A2=N, And then I want to set B2 as 1.

Thanks in advance,
newbie

B1: =IF(A1="Y",0,"undefined")
B2: =IF(A2="N",1,"undefined")


--ron
 
Hi Ron,

If I want to set it as follows,

If A1 cell is Y or N, and I would like to set B1 as Y=0 or N=1.

Thanks again.
www
 
=IF(A1="Y",0,IF(A1="N",1,""))

in B1, and copy down

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi Ron,

If I want to set it as follows,

If A1 cell is Y or N, and I would like to set B1 as Y=0 or N=1.

Thanks again.
www


B1: =IF(A1="Y",0,IF(A1="N",1,"undefined"))


--ron
 
www said:
Hi all,

I would like to know how to achieve the following task.

If A1 cell is Y, and I would like to set B1 as 0.
If A2 cell is N, and I would like to set B2 as 1.


A1=Y, And then I want to set B1 as 0.
A2=N, And then I want to set B2 as 1.

Thanks in advance,
newbie

Try putting this in B1, drag down to fill as far as you need to:

=IF((OR(A1="Y",A1="y")),1,IF(OR(A1="N",A1="n"),0,"Undefined"))

This will capture a CAPS issue from data entry (I'm sure there are other
issues to "catch", but I'm no expert

Beege
 
There is no caps issue, a lower-case or upper-case letter will test the same
in a simple cell test.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Bob said:
There is no caps issue, a lower-case or upper-case letter will test the same
in a simple cell test.

Thanks Bob,

I sit corrected...

Beege
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top