Creating an equation.

S

Scott

I am trying to create an equation that will allow Excel to
look at one cell and then make a calculation based on
whether there is one of three entries placed in that
cell. Either it will be blank, have a '1', or have
a '2'. Example: If cell B1=1, then (B10*.8/11), If B1=2,
then (B10*.9/11), If B1= 0, then (B10/11).

How do I get this all into one equation?
 
B

Bob Phillips

Scott,

=IF(B1=1, B10*0.8/11,IF(B1=2,B10*0.9/11,B10/11))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
T

Tushar Mehta

You need to clarify if blank is the same as zero. Legitimate values
seem to be blank, 1, and 2, but then criteria are specified for 0, 1,
and 2.

Assuming blank is indeed zero, use =B10/11*CHOOSE(B1+1,1,0.8,0.9).
This will also automatically generate an error if B1 contains something
other than the expected values.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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