Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
www www is offline
external usenet poster
 
Posts: 2
Default Maybe this is a simple question

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


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Maybe this is a simple question

On Tue, 6 Feb 2007 20:32:51 +0800, "www" wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 3,101
Default Maybe this is a simple question

=IF(A1="y",0,"") placed in B1
=IF(A2="n",1,"") place in B2

"www" wrote:

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



  #4   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
www www is offline
external usenet poster
 
Posts: 2
Default Maybe this is a simple question

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

"Ron Rosenfeld"
...
On Tue, 6 Feb 2007 20:32:51 +0800, "www" wrote:

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



  #5   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default Maybe this is a simple question

=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)



"www" wrote in message
...
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

"Ron Rosenfeld"
...
On Tue, 6 Feb 2007 20:32:51 +0800, "www" wrote:

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







  #6   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Maybe this is a simple question

On Tue, 6 Feb 2007 20:45:56 +0800, "www" wrote:

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
  #7   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default Maybe this is a simple question

www wrote:
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
  #8   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default Maybe this is a simple question

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)



"Beege" wrote in message
. ..
www wrote:
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



  #9   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default Maybe this is a simple question

Bob Phillips wrote:
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple message box question zeyneddine Excel Discussion (Misc queries) 4 August 23rd 06 06:08 PM
Simple message box question zeyneddine Excel Discussion (Misc queries) 1 August 14th 06 08:23 PM
Simple graph formatting question for dates. LordJezo Excel Discussion (Misc queries) 1 July 21st 06 06:03 PM
Simple AutoFill Series Question Abode Excel Discussion (Misc queries) 1 March 23rd 06 07:28 AM
simple Wildcard Question nastech Excel Discussion (Misc queries) 3 October 17th 05 03:56 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"