View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Fish Fish is offline
external usenet poster
 
Posts: 11
Default if then statement with 16 constraints and 1 equation

Here is my sample equation:
=IF(M2=N2,IF(P2=0,((R2-(R2*0.35)-M2)/R2),((P2-(P2*0.35)-M2)/P2)),IF(N2=0,((R2-(R2*0.35)-M2)/R2),"FALSE"))

There are four colums of data and a total of 16 differnet combinations based
on statistics. These are not the actual numbers but here are all of the
combinations:

M N O P

1 0 1 1
0 0 0 1
0 0 1 1
0 1 1 1
1 1 1 1
1 0 0 0
1 1 0 0
1 1 1 0
0 1 0 0
0 0 1 0
0 1 1 0
1 1 0 1
1 0 0 1
0 0 0 0
0 1 0 1
1 0 1 0

Here are the constrainsts:

1. If M=N compute the equation
2. If M is unequal to N give a value of false
3. If a value exist for O and P use the value for O
4. If a value of zero is used for the O colums use the value for P to
compute the equation.

I hope this helps.

Thanks for your assistance,

Fish

"Don Guillett" wrote:

more info and a sample would be helpful

--
Don Guillett
SalesAid Software

"Fish" wrote in message
...
Hello,

Is it possible to constuct a 16 constraint nested if then statement using
one equation as the control equation? Is there a better way to do this?
Please advise...

Regards,

Fish