How to shorten if or formula ?

pkh135

New Member
Joined
Jun 6, 2009
Messages
10
Dear Sir and Madam,

Need your suggestion on how to shorten this formula ? The data range is from B11 to B21, at the moment I had to manually add in one by one.

=IF(OR(B11<$I$16,B11>$I$19,B12<$I$16,B12>$I$19,B13<$I$16,B13>$I$19,B14<$I$16,B14>$I$19,B15<$I$16,B15>$I$19,B16<$I$16,B16>$I$19,B17<$I$16,B17>$I$19,B18<$I$16,B18>$I$19,B19<$I$16,B19>$I$19,B20<$I$16,B20>$I$19,B21<$I$16,B21>$I$19),1,0)


Thank you.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Can you please explain in English exactly what it is you are trying to do (I don't like to try to guess the person's intentions by trying to figure out what they are trying to do from a complex formula)?
 
Upvote 0
Maybe
=IF(OR(B11:B21<I16,B11:B21>I19),1,0)

Confirmed with Ctrl Shift Enter, not just Enter
 
Upvote 0
Maybe
=IF(OR(B11:B21<i16,b11:b21>I19),1,0)

Confirmed with Ctrl Shift Enter, not just Enter

Dear Fluff,

I had tried, but doesn't work.
=IF(OR(B11:B21<I16,B11:B21>I19,1,0))

It prompt message too many arguments.

</i16,b11:b21>
 
Upvote 0
Can you please explain in English exactly what it is you are trying to do (I don't like to try to guess the person's intentions by trying to figure out what they are trying to do from a complex formula)?

Dear Joe4,

I had tried to post the full detail with table but not show at forum. So I just copy the formula.
Is ok..let me short briefing about how it's work.


Target value is 100, tolerance -5% is 95 at I16; +5% is 105 at I19.
Data range B11 to B21.
The result show in merge column is C11 to C21
When the data range contain the value less than 95 or more than 105, result will show 1.
If the data range is in between value of 95 to 105, result will show 0.

Data range is in daily, if for 30 days or 3 months result, I had to manually to type it.
So I looking for help for shorten this formula by data range in form of B11:B21 but it doesn't work.
 
Last edited:
Upvote 0
I think you want all numbers < i16 and >i19
If this is true
See this file

Book1
BCDFIJKL
10How_manyList
1141741
121212
134848change the value if $I$16 or $I$19
1466
151313
16282810Min
172929
1821
194225Max
2031
2110
Sheet1
Cell Formulas
RangeFormula
D11{=SUMPRODUCT(($B$11:$B$21<$I$16)+($B$11:$B$21>$I$19))}
F11{=IF(ROWS($F$11:F11)>$D$11,"",INDEX($B$11:$B$21,SMALL(IF(($B$11:$B$21<$I$16)+($B$11:$B$21>$I$19),ROW($B$11:$B$21)-ROW($B$11)+1),ROWS($F$11:F11))))}
Press CTRL+SHIFT+ENTER to enter array formulas.


 
Last edited:
Upvote 0
Try this:

=IF(OR(MIN(B11:B21)<$I$16,MAX(B11:B21)>$I$19),1,0)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top