+ Reply to Thread
Results 1 to 8 of 8

condition not returning False

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-17-2008
    Posts
    156

    condition not returning False

    hi

    based on this if statement, i should get False instead of True.

    =IF(A4=A3,D4="P",D3="U")



    APRU 5072479 20/09/2008 07:44:04 KR07/47-4 U Y TRUE
    APRU 5073285 17/09/2008 20:37:48 KP12/30-3 U O TRUE




    whats went wrong ??
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You can not have a formula in column F changing a non formula entry in column D

    try
    =IF(A4=A3,TRUE,FALSE)
    Last edited by mudraker; 10-30-2008 at 07:27 AM.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    All 3 of those arguments are conditions that return TRUE/FALSE

    So if Condition 1 is True, it will check the 2nd Condition and return TRUE/FALSE...

    if Condition 1 is False, it will check the 3rd condition and return TRUE/FALSE...

    In your case above, Condition 1 is FALSE, so it Checks the 3rd argument (ie. D3="U") which it does, so you get TRUE back.

    What is it you really need?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    01-17-2008
    Posts
    156
    NBVC,

    i need to check all the 3 conditions must be true to be valid, guess im wrong with the if statement.
    Last edited by okl; 10-30-2008 at 07:44 AM.

  5. #5
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    How about

    =IF(AND(A3=A2,D3="P",D2="U"),TRUE,FALSE)
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by EdMac View Post
    How about

    =IF(AND(A3=A2,D3="P",D2="U"),TRUE,FALSE)
    If you are wanting TRUE/FALSE results, then there is no need to use the IF() statement.

  7. #7
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Point taken, thanks NBVC

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =AND(A4=A3,D4="P",D3="U")

+ 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