Question: All.

I am trying to use IF/OR/AND formula for the below conditions.

1. If S = 0, then use the lowest of M and F, provided both M and F has a value which is greater than 0. If either one in M and F is zero then take the one in M and F which is greater than zero.
2. If all S,M and F is Zero, then it should show zero.
3. If M and F has a value which is greater than S, even then it should use the value which is in S, provided S is greater than 0.
4. In the Final Value column - It should show me the the value of S, provided the value of S is greater than Zero or the value from condition 1.

Please note: I do not require all the condition to be satisfied in one single formula. There can be multiple columns to fulfill these conditions.

I am attaching a spreadsheet where i have these conditions. Also, i have tried using formula. Please feel free to create and new tab and work on it.

Link for the excel file: <https://drive.google.com/open?id=0B403VWJ4ZXfoRDNGdUNCSVNkMWc>

Thank you very much!

Answer: 
Answer will be as 

```
= IF (A2=0, MIN( IF(B2>0,B2,0), IF(C2>0, C2, 0) ), IF(A2=0&B2=0&C2=0,0, IF(B2>A2&C2>A2,IF(A2>0, A2, 0),0 ) ) )

```

Step by step is shown below
[![enter image description here](https://i.stack.imgur.com/Ynh0f.png)](https://i.stack.imgur.com/Ynh0f.png)
Assuming Value of `S` will never be less than `0`, enter the following formula in `Cell D2`

```
=IF(A2=0,IF(B2>0,IF(C2>0,MIN(B2,C2),B2),IF(C2>0,C2,0)),IF(AND(B2>A2,C2>A2),A2,MIN(B2,C2)))

```

Drag/Copy down as required.

[![enter image description here](https://i.stack.imgur.com/BR4xP.png)](https://i.stack.imgur.com/BR4xP.png)