+ Reply to Thread
Results 1 to 7 of 7

Nested if statements comparing four columns getting a FALSE result

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Nested if statements comparing four columns getting a FALSE result

    Hello,

    I'm trying to compare four columns. I've attached a short example with my formula under the Overall Status column. Here is my formula for discussion if others cannot see attachment

    =IF(A2="TRUE",IF(B2<>"",IF(C2<>"",IF(D2="Complete","Done","Pending"))))

    A2____B2__________________C2____________________D2
    True___6/18/2019 7:00:00 AM__7/17/2018 7:00:00 AM __Complete
    True_______________________7/17/2018 7:00:00 AM __ Submitted
    True __7/17/2018 7:00:00 AM _______________________Submitted
    True___6/18/2019 7:00:00 AM__7/17/2018 7:00:00 AM___Submitted

    I keep getting the result FALSE when it needs to provide Done or Pending.

    Getting frustrated because I cannot see what is wrong with my formula.

    Your assistance would be greatly appreciated.

    Bev
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Nested if statements comparing four columns getting a FALSE result

    How about
    =IF(AND(A2,B2<>"",C2<>"",D2="Complete"),"Done","Pending")

    You're formula will always return false as you have TRUE wrapped in quotes, which should not be there. Also you have not supplied a false argument to any of the IFs.

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Nested if statements comparing four columns getting a FALSE result

    Like Fluff says:
    If you want to retain your formula then you should:

    1. remove quotes "" from the word TRUE.
    2. add 'value if false' to each of your nested IFS like this:
    =IF(A2=TRUE,IF(B2<>"",IF(C2<>"",IF(D2="Complete","Done","Pending"),"Pending"),"Pending"),"Pending")

  4. #4
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Cool Re: Nested if statements comparing four columns getting a FALSE result

    Thank you Fluff13,

    It worked but I had to add the quotes around the word true because the report has the word true in the cell.

    Thank you for your quick response and your suggestion. I see where my error was. You learn something new with excel everyday!
    Last edited by Bevg; 06-29-2020 at 03:55 PM.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,072

    Re: Nested if statements comparing four columns getting a FALSE result

    You're welcome & thanks fr the feedback.
    In your sample file it had a boolean term TRUE, which is not text & therefore should not have the quotes.

  6. #6
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Nested if statements comparing four columns getting a FALSE result

    Belinda200,
    Thank you for your example. The example showed me right where I was making the mistake. After I changed my formula everything worked!

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Nested if statements comparing four columns getting a FALSE result

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting rid of false result from nested if statements
    By jmenzel30 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-31-2018, 06:56 AM
  2. Replies: 6
    Last Post: 10-09-2018, 01:11 PM
  3. [SOLVED] Comparing Multiple columns across worksheets and returning a True/False statement
    By RoryK in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-11-2015, 10:33 PM
  4. [SOLVED] Nested IF statements are returning FALSE values - cannot find error in code!
    By apex_chio in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-03-2013, 11:01 PM
  5. [SOLVED] False result when trying to sum results of IF statements across worksheets
    By mark.studley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2013, 10:31 AM
  6. Replies: 5
    Last Post: 06-15-2010, 10:51 AM
  7. Excel 2007 : Nested IF Statements - Tracing a False Result?
    By jackinthebox in forum Excel General
    Replies: 2
    Last Post: 04-13-2010, 09:18 PM

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