decision Box Y

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?
 
J

JE McGimpsey

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).
 
S

Scoober

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

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

Top