# Thread: Specify data ranges in logical tests

1. ## Specify data ranges in logical tests

Hi To Everyone,

I searched for but did not find a thread/post for the following:

How do you check for either a continuous or discontinuous horizontal or vertical range or sequence of cells when conducting a logical test such as =if(or(.....),1,0) ?

I've tried the D234 format no luck, any suggestions or help?

Thank you...
Marty

2. I do not completely understand what you are after can you elaborate?

Steve

3. Originally Posted by sdckapr
I do not completely understand what you are after can you elaborate?

Steve
Hi Steve,

I don't know how the smiley face got in there sorry.... I want to check the values in a range of horizontal or vertical cells either continuous or not; I attached an excel sheet; so if I want to check the values in each row i.e. if(or(b2:r2<-0.7,b2:r2>0.7),1,0) for each row, it get the standard formula error window.....maybe I have a brain cramp...thought you could do it in excel. Along with this I would like to do the same for a discontinuous range of cells.

Marty

4. Are you looking for something like?:
=IF(OR(MIN(B2:R2)<-0.7,MAX(B2:R2)>0.7),1,0)

Steve

5. Originally Posted by sdckapr
Are you looking for something like?:
=IF(OR(MIN(B2:R2)<-0.7,MAX(B2:R2)>0.7),1,0)

Steve
Hi Steve,

So it is the additional parentheses...what does the max min get me? In this case I am interested in the data outside or beyond the -0.7 - 0.7 spec.

Marty

6. I am confused. I thought you wanted to know if a RANGE of cells (B2:R2) had any cells that are outside the range. The Min(B2:R2) gives the minimum in that range, Max(B2:R2) gives the max. If either the min is <-.7 or the max is >.7 then there is at least one cell in the range that is too low or too high. The formula does not specify which cell, but you did not seem interested in that...

If you are you looking for an individual cell then use something with a formula for just one cell like:
=IF(OR(B2<-0.7,B2>0.7),1,0)

If neither are what you are after, you will need to elaborate and explain your request better...
Steve

7. Hi Steve,

No you fully explained it the first paragraph of your last response. In my case I am only interested if any datapoint in the specified RANGE is beyond the spec limits 0 +/-0.7, the MIN and MAX gives me additional data of MIN and MAX which is good to know for future problems....

Thank you once again for your valuable input!!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•