Thread: simple formula
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
marley marley is offline
external usenet poster
 
Posts: 3
Default simple formula

Thank You!!

wrote:
marley wrote:
in cell A2 I have 2
If i enter a "yes" in E2
I want F2 to equal 2 (same as A2)


What if E2 is not "yes"? Learn to always specify the "otherwise"
(else) case.

For what you have specified thus far, in F2, write:

=if(E2="yes", A2, "")

The 3rd parameter ("") leaves the cell empty if E2 is not "yes". Fill
in something else appropriate, if you want.

With the formula above, F2 will always equal A2 when E2 is "yes", even
if A2 is not 2. Is that what you want? Or did you intend something
like:

=if(and(E2="yes", A2=2), 2, "")

Thus, F2 is 2 only when E2 is "yes" and A2 is 2.