decision Box Y

  • Thread starter Thread starter Scoober
  • Start date Start date
S

Scoober

How do i put a formula that recognises a 'yes' or 'no' answer?

e.g X Y Z

1 10,000 No 0.000

If Y1 has 'No' printed in it then 0.000 is printed in Z1

However if 'Y1' has 'yes' printed in it I need a formula of =sum(X1*0.03) to
be completed (see below).

e.g X Y Z

1 10,000 yes 300

Can anybody help?
 
One way:

Z1: =IF(Y1="Yes", X1 * 0.03, 0)

An alternative:

Z1: =X1 * 0.03 * (Y1="Yes")


The latter works because if "Yes" is in Y1, then 'Y1="Yes"' returns TRUE
which in math formulae is converted by XL to the value 1 (FALSE is
converted to 0).
 
Thank you JE that worked straigjht away.

JE McGimpsey said:
One way:

Z1: =IF(Y1="Yes", X1 * 0.03, 0)

An alternative:

Z1: =X1 * 0.03 * (Y1="Yes")


The latter works because if "Yes" is in Y1, then 'Y1="Yes"' returns TRUE
which in math formulae is converted by XL to the value 1 (FALSE is
converted to 0).
 
Back
Top