+ Reply to Thread
Results 1 to 10 of 10

IF_true/false

  1. #1
    Registered User
    Join Date
    11-14-2010
    Location
    HK
    MS-Off Ver
    Excel 2007
    Posts
    28

    IF_true/false

    Can anyone help on this formula? I would appreciate!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: IF_true/false

    Hi cicihk

    copy the following in cell # R11

    =IFERROR(IF(MATCH("Fail",K11:P11,0)>0,"Fail",""),"")

  3. #3
    Registered User
    Join Date
    11-14-2010
    Location
    HK
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: IF_true/false

    Quote Originally Posted by Azam Ali View Post
    Hi cicihk

    copy the following in cell # R11

    =IFERROR(IF(MATCH("Fail",K11:P11,0)>0,"Fail",""),"")
    It works. You're superb!!
    Can you tell me ">0" means?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,033

    Re: IF_true/false

    That formula will work only for XL 2003.

    This will work for previous versions too:

    =IF(COUNTIF(K4:P4, "Fail")>0, "Fail", "")
    Never use Merged Cells in Excel

  5. #5
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: IF_true/false

    hi cicihk

    first the match function is giving the column numbre if Fail is found in the range. that number >0 will give result true if there is a fail in the range.

    an if true if function give result "Fail"

  6. #6
    Registered User
    Join Date
    11-14-2010
    Location
    HK
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: IF_true/false

    Quote Originally Posted by zbor View Post
    That formula will work only for XL 2003.

    This will work for previous versions too:

    =IF(COUNTIF(K4:P4, "Fail")>0, "Fail", "")
    It works as well. Thanks. But why you guys put ">0" ?

  7. #7
    Registered User
    Join Date
    11-14-2010
    Location
    HK
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: IF_true/false

    Quote Originally Posted by Azam Ali View Post
    hi cicihk

    first the match function is giving the column numbre if Fail is found in the range. that number >0 will give result true if there is a fail in the range.

    an if true if function give result "Fail"
    Azam Ali,
    ic. will it be ok if I omit ">0" in the function?

  8. #8
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: IF_true/false

    No. dont omit >0; becouse it is checking the existance of "Fail" in the range

    break the function and evaluate. this may help in understanding. e.g

    in one cell say S11 first look at the result of =MATCH("Fail",K11:P11,0)
    then in next cell T11 look at =IF(S11>0,"Fail","")
    then in next cell U11 look at =IFERROR(T11,"")

    copy paste these from row 3 to row 11.
    Last edited by Azam Ali; 07-15-2011 at 03:16 AM.

  9. #9
    Registered User
    Join Date
    11-14-2010
    Location
    HK
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: IF_true/false

    Quote Originally Posted by Azam Ali View Post
    No. dont omit >0; becouse it is checking the existance of "Fail" in the range

    break the function and evaluate. this may help in understanding. e.g

    in one cell say S11 first look at the result of =MATCH("Fail",K11:P11,0)
    then in next cell T11 look at =IF(S11>0,"Fail","")
    then in next cell U11 look at =IFERROR(T11,"")

    copy paste these from row 3 to row 11.
    Clear.. Thanks much again!!

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,033

    Re: IF_true/false

    Quote Originally Posted by cicihk View Post
    It works as well. Thanks. But why you guys put ">0" ?
    COUNTIF has another approach.

    It COUNTS how many times Fail appear in the range.

    It can be:
    0 (never appear)
    1 (appears once)
    2 (appears twice)
    3,4,5... etc

    If it never appear (0) then it's OK.
    If it appears more then zero (>0) write FAIL.

    So...

    IF( (COUNT how many times appear) is greather then zero write FAIL, otherwise lave blank.

    This is by words... How you can tell to excel see formula above.

    You could also use:

    =IF(COUNTIF(K4:P4, "Fail")=0, "", "Fail")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1