# Thread: IF function array syntax help

1. ## IF function array syntax help

Hello, I am trying to get the IF function to search the table of data for values <=10 and > 0.

This is the formula I am trying to use.

=IF((F5:I5>0)*(F5:I5<=10),"Passed","Failed")

The formula will not run my test for horizontal data, it only returns #Value. I can not find any resources online to explain why an IF function can not be used horizontally.

Code:
`=IF(COUNTIFS(F5:I5,">"&0,F5:I5,"<="&10),"Passed","Failed")`
Cheers,

3. =IF(AND(F5:I5>0),(F5:I5<=10)),"Passed","Failed")

4. Thank you both for your replies! Do you know if there is any way to perform this function with out nesting any others? I was trying to do this entirely with a single IF function. It may not be possible but I was just curious. @cheshirecat @samt

5. SamT's formula is wrong on logic and syntax, and whilst CheshireCat's formula will work if you want any of those values to be >0 and < 10, although there is no need to concatenate the criteria, I think you want all of them so it needs changing to

=IF(COUNTIFS(F5:I5,">0",F5:I5,"<=10")=4,"Passed","Failed")

I don't think you can get it without another embedded function.