Logic "IF" statement

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I want to compare the individual values in a row of
several cells to a reference value in yet another cell.
Example: Compare the numbers 18.2, 18.4, 18.6, 18.8 to
the reference range 18.0 - 19.0 and place a "pass/fail"
indication in another cell.

Visually:
Reference is: A1 = 18.0
A2 = 19.0

Subject values are: B1=18.2; C1=18.4; D1=18.6; E1=18.8

Post result in cell C1
 
This will compare B1 to both limits. It does not compare
all 4 (B1, C1, D1, E1) to both limits and report "pass"
or "fail" if one or more are outside the limits.

Also, please excuse my error in designating the cell in
which to report the results.

Larry
 
Hi
then try:
=IF(SUMPRODUCT(--(B1:E1>=$A$1),--(B1:E1<=$A$2))=4,"Pass","Fail")
 
=--(SUMPRODUCT(--(B1:E1>=A1),--(B1:E1<=A2))=COUNT(B1:E1))

Custom format the formula cell as:

[=0]"Fail";[=1]"Pass"
 

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

Back
Top