View Single Post
  #7   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.worksheet.functions
Beege Beege is offline
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