Logic function

L

Larry

I am looking for help in compare a row of 8 individual
values to an uppper and lower reference. If any of the 8
are greater than the upper reference or if any of the 8
are lower than the lower reference, I want to
display "FAIL" in the formula cell.
The "IF" logic functions seems to be the most likely way
to do this, but I cannot get it to work beyond testing 1
data value.

Example:
Upper equals 5, lower equals 3.
With data points of 3, 5, 4, 6, 3, 4, 3, 5; result should
show "Fail" as the 4th value is greater than the upper
limit.

With data points of 3, 5, 4, 2, 3, 4, 3, 5; result should
show "fail" as the 4th value now is lower than the lower
limit.

With data points of 3, 5, 4, 2, 3, 4, 6, 5; result should
show "fail" as the 4th value now is lower than the lower
limit and the 7th value is greater than the upper limit.
 
H

Harald Staff

Hi
With data in A1:A10
=MAX(A1:A10)>5
=MIN(A1:A10)<2
will return TRUE instead of Fail if a value is greater than max / smaller
than min, FALSE else. You can use that TRUE / FALSE value in a single IF if
the description is important.

HTH. Best wishes Harald
 
R

RagDyer

Try this:

=IF(MIN(5,MAX(3,A1))<>A1,"FAIL","")

And drag down to copy.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

I am looking for help in compare a row of 8 individual
values to an uppper and lower reference. If any of the 8
are greater than the upper reference or if any of the 8
are lower than the lower reference, I want to
display "FAIL" in the formula cell.
The "IF" logic functions seems to be the most likely way
to do this, but I cannot get it to work beyond testing 1
data value.

Example:
Upper equals 5, lower equals 3.
With data points of 3, 5, 4, 6, 3, 4, 3, 5; result should
show "Fail" as the 4th value is greater than the upper
limit.

With data points of 3, 5, 4, 2, 3, 4, 3, 5; result should
show "fail" as the 4th value now is lower than the lower
limit.

With data points of 3, 5, 4, 2, 3, 4, 6, 5; result should
show "fail" as the 4th value now is lower than the lower
limit and the 7th value is greater than the upper limit.
 

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