Results 1 to 5 of 5

Thread: IF function array syntax help

  1. #1

    IF function array syntax help



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.

  2. #2
    Conjurer CheshireCat's Avatar
    Join Date
    Dec 2011
    Location
    Victoria, Canada
    Posts
    121
    Articles
    0
    Excel Version
    Microsoft Excel 2013
    Try this instead:

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

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

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

Tags for this Thread

Posting Permissions

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