# If a range of cell values is between 2 numbers?

#### vab

##### New Member
I'd like to make a Pass/Fail statement based upon whether or not a range of cells contain any number above 1 or below -1. If the values are outside that range I'd like the cell to display Fail, if the values are withing the range I'd like the cell to display Pass.

I know the formula isn't correct, but I was trying to go in this direction:
=IF('Participant 1'!I11:I16<-1,"Fail",IF('Participant 1'!I11:I20>1,"Fail","Pass"))

I would appreciate any help. Thank you.

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
.
.

=IF(OR(A1<-1,A1>1),"fail","pass")

The problem is, when I replace the cell reference with a range, it will then return #VALUE!
I'm not sure this will work with selecting ranges.

I was able to use 2 steps to get the result, but I wanted to see if it could be done with 1.

=COUNTIF('Participant 1'!I11:I20,">-1") - COUNTIF('Participant 1'!I11:I20,"<1")
=IF(COUNTIF(E27,"0"),"Pass","Fail")

.
.

Confused. Without giving a formula, can you please explain (in words) exactly what you're trying to do?

I want excel to look at a range of cells (ie A1:A10) to see if any values are outside the numeric range of -1 to 1. If there are any values outside, then display Fail, if not Pass.

=IF(A1:A10)<-1,"Fail",IF(A1:A10>1,"Fail","Pass"))

I was able to get it to work with the 2 step process in my 2nd post. However, I wanted to see if there as a easier, cleaner, 1 step formula.

Hope I'm making my self clearer.

I used the countif to return a number of times a value outside the range was displayed.
=COUNTIF(I11:I20,">-1") - COUNTIF(!I11:I20,"<1")

Then I used the below formulat to display Pass/Fail based upon the number that was returned from the above formula
=IF(COUNTIF(E27,"0"),"Pass","Fail")

.
.

Either of these array formulas will work:
(You need to press CTRL+SHIFT+ENTER to enter them correctly.)

=IF(OR(A1:A10<-1,A1:A10>1),"fail","pass")

=IF(OR(ABS(A1:A10)>1),"fail","pass")

Replies
3
Views
55
Replies
6
Views
197
Replies
4
Views
122
Replies
0
Views
19
Replies
7
Views
116

1,203,069
Messages
6,053,352
Members
444,655
Latest member
didr

### 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