# Combining IF, OR and MIN

#### Kribulin

##### Board Regular
I currently have the following condition set:

= I F ( A 1 0 < G \$ 4 ; 0 ; M I N ( G \$ 5 ; B 1 0 ) )<g\$4;0;min(g\$5; b10))="">

Now I want to add that if A10 is bigger than G6, the value is also 0.

But as I try to add this condition like this:
</g\$4;0;min(g\$5;> = I F ( A 1 0 < G \$ 4 O R ( A 1 0 > G 6 ) ; 0 ; M I N ( G \$ 5 ; B 1 0 ) )<g\$4;0;min(g\$5; b10))=""><g\$4 or="" (a10="">

it doesn't work. What's false?

</g\$4></g\$4;0;min(g\$5;>

Last edited:

### Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

#### Kribulin

##### Board Regular
Sorry, I have problems posting the code, so I justed added blanks in it in the original post.
<g\$4 or="" (a10=""></g\$4>

Last edited:

#### Mike Blackman

##### Well-known Member
Hi,

Try;

PHP:
``=IF(OR(A10<G\$4,A10>G6),0,MIN(G\$5;B10))``

When posting with multiple <'s >'s use the PhP Code Tags

#### Kribulin

##### Board Regular
Brilliant, thank you!

Replies
5
Views
155
Replies
1
Views
172
Replies
3
Views
247
Replies
6
Views
266
Replies
5
Views
226

1,190,865
Messages
5,983,289
Members
439,836
Latest member
BuckyBoyRx

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back