+ Reply to Thread
Results 1 to 10 of 10

Getting rid of false result from nested if statements

  1. #1
    Registered User
    Join Date
    01-03-2018
    Location
    St. Louis
    MS-Off Ver
    2016
    Posts
    32

    Getting rid of false result from nested if statements

    Hello,

    I'm having trouble getting this formula to read what I need it to read. Essentially, this is a decisioning tool. Its used to be in the format that if this is not a prohibited type of business, and all of the documentation has been supplied, then I want to approve it. Or in this sense, I want it to read "Continue To Calculator". I have all of the rules built into the formula that would stop the document from being approved. But if all values are the way they are supposed to be, I just get the result of "False". Is there an easy fix to this please help. I have spent the last 6 hours trying to make this work right, and its just not doing it. The formula is:

    =IF(H11=FALSE,"Pending",IF(H13=FALSE,"Pending",IF(H15=FALSE,"Pending",IF(H17=FALSE,"Pending",IF(O13=FALSE,"Pending",IF(O15=FALSE,"Pending",IF(O17=FALSE,"Pending",IF(AND(OR(T3="LLC",T3="Government",T3="Corporation",T3="Nonprofit/Tax Exempt",T3="Association/Estate/Trust"),V11=FALSE),"Pending",IF(V13=FALSE,"Pending",IF(V15=FALSE,"Pending",IF(V17=FALSE,"Pending",IF(H19=FALSE,"Pending",IFERROR(IF(AND(VLOOKUP(L5,'Alpha List'!C302:C308,1,FALSE)=L5,W7="Yes"),"Prohibited Merchant","Continue To Calculator"),IFERROR(IF(VLOOKUP(L5,'Alpha List'!C8:C252,1,FALSE)=L5,"Prohibited Merchant",),IF(AND(OR(T3="Sole Proprietor",T3="Partnership"),V11=FALSE),"Continue To Calculator")))))))))))))))

    I just want that if all of these statements are true, I want it to say Continue To calculator instead of false.

    Thanks!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Getting rid of false result from nested if statements

    hi there. always provide a sample excel file so it's easier for us to see. right now, we have to guess what values your cells has. we are also assuming the logic of the formula is correct.

    I just want that if all of these statements are true, I want it to say Continue To calculator instead of false
    i'm not sure if you are trying to say if all of the CELLS are showing TRUE, then show "Continue to calculator". because if you are saying statements being true, then the first IF would have already show it as "Pending".
    =IF(H11=FALSE,"Pending"
    the above formula is saying if cell H11 is equals to FALSE, show as "Pending". so if cell H11 is FALSE, it is asking if FALSE is equals to FALSE. it is of course TRUE and shows "Pending". since your result is showing FALSE, i doubt you are referring to this.

    you also used OR in your formula, so i assume you know how to. so isn't it possible to group many of them in an OR? for eg.
    =IF(OR(H11=FALSE,H13=FALSE,H15=FALSE,H17=FALSE,O13=FALSE,O15=FALSE,O17=FALSE),"pending")

    your problem probably lies here:
    ...IFERROR(IF(VLOOKUP(L5,'Alpha List'!C8:C252,1,FALSE)=L5,"Prohibited Merchant",),IF(AND(OR(T3="Sole Proprietor",T3="Partnership"),V11=FALSE),"Continue To Calculator")),....
    but i would have to look in your file and also understand your criteria in layman's terms. it seems like you want to check if a certain value appears in another worksheet. you just need to use Countif for that. and if they can't be found, it will be False because of your IFERROR.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Getting rid of false result from nested if statements

    Dissecting this it looks like:

    - If any of H11,H13,H15,H17,H19,O13,O15,O17,V13,V15,V17 are FALSE then the status is "Pending"
    - If V11 is FALSE and T3 is one of "LLC","Government","Corporation","Nonprofit/Tax Exempt","Association/Estate/Trust" then the status is "Pending"
    - If L5 appears in 'Alpha List' C302:C308 then is W7 is "Yes" the status is "Prohibited Merchant" otherwise "Continue To Calculator"
    - If L5 appears in 'Alpha List' C8:C252 then the status is "Prohibited Merchant"
    - There is a final check for V11 being false and T3 one of "Sole Proprietor","Partnership" which sets the status to "Continue To Calculator" but that seems overkill because that's now the default result.

    However, if the above is correct then perhaps try the following:

    Please Login or Register  to view this content.
    Hard to test without having actual examples to hand ...

    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Registered User
    Join Date
    01-03-2018
    Location
    St. Louis
    MS-Off Ver
    2016
    Posts
    32
    That is correct. I have attached the document to this reply. Sorry for the minimal effort on that after spending so long on one formula I was burnt out. The cell in reference to his post is on the core document requirements tab cell F23. I have not plugged in your formula yet, but I’m sure it will work better than mine. I’m also having trouble on the tab labeled MEC CELL D27. When cell G25 is over 50,000 it should always read “concurrence required” but if the cell is referenced on the ‘alpha list’!c307:c308 no matter what it’s onky reading approved or prohibited merchant. Got any ideas?

    Thanks guys!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-03-2018
    Location
    St. Louis
    MS-Off Ver
    2016
    Posts
    32

    Re: Getting rid of false result from nested if statements

    That formula worked great. I have no idea how to use the isnumber and match functions, but judging by this, I should probably become much more well versed in it. Does the * mean or?

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Getting rid of false result from nested if statements

    Great! If you're happy with the solution, please mark the thread as solved. Two things:

    - ISNUMBER(MATCH()) is just checking whether the item is in the list; it's common way to do this check and probably better than VLOOKUP.
    - The multiplication is done on the all the Boolean values (TRUE/FALSE). Anything multiplied by FALSE will be zero so if any of those values are FALSE, the calculation will return 0.

    WBD

  7. #7
    Registered User
    Join Date
    01-03-2018
    Location
    St. Louis
    MS-Off Ver
    2016
    Posts
    32

    Re: Getting rid of false result from nested if statements

    So with the formula you provided for me, I want to add an iferror statement to it that would essentially say IFERROR(VLOOKUP(L5,Database!A2:I670,4,FALSE)),"No Valid MCC"). Essentially that is just saying if the number in the cell isn't on the database I want it to return a message saying "No Valid MCC" for some reason I am having a lot of trouble integrating that login into my formula. Do you have any advice?

    Thanks!

  8. #8
    Registered User
    Join Date
    01-03-2018
    Location
    St. Louis
    MS-Off Ver
    2016
    Posts
    32

    Re: Getting rid of false result from nested if statements

    Well for starters the range should just be A2:A670

  9. #9
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Getting rid of false result from nested if statements

    Not sure where you wanted that check:

    Please Login or Register  to view this content.
    WBD

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Getting rid of false result from nested if statements

    Thread now marked unsolved.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] If the IF function result is false then check the next cell until get a true result
    By Beag air Bheag in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-10-2017, 08:55 AM
  2. [SOLVED] Nested HLOOKUP returns "FALSE" in cell where result should be "0.00"
    By gammccubbin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2016, 09:49 AM
  3. [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
  4. [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
  5. Replies: 5
    Last Post: 06-15-2010, 10:51 AM
  6. 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
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

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