+ Reply to Thread
Results 1 to 6 of 6

IF formula that shows "FALSE" instead of prepared text, and a few bugs

Hybrid View

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Irving, TX
    MS-Off Ver
    Excel 2010
    Posts
    13

    IF formula that shows "FALSE" instead of prepared text, and a few bugs

    Hi,

    I've created a formula that checks to see if there is data in certain cells, if all the cells don't have something in them, the user will get an error "You do not qualify for this expense"
    1. Looks at cell BE3, to make sure it is NOT blank
    2. Looks at cell BG3, to make sure it is NOT blank
    3. Looks at cell BI3, to see if there is data in it and to see if user selected "US" or "Canada"
    4. Looks at cell BR3, to see if there is data in it and to see if to see if the user selected "Yes" or No"

    If the user has data in BE3 & BG3 and selects "US" in BI3 and "Yes" in BR3, they will get a message "You qualify for $25 per month"
    If the user has data in BE3 & BG3 and selects "Canada" in BI3 and "Yes" in BR3, they will get a message "You qualify for $30 per month"

    If any of the cells are empty, Or if they select "No" in cell BR4, they should get the message: "You do not qualify for this expense"
    I have created the formula:

    =IF(AND(BE3<>""),IF(OR(BG3<>""),IF(AND(BI3="us",BR3="yes"),"Up to $25 per month",IF(OR(BI3="canada",BR3="yes"),"Up to $30 per month"))),"You do not qualify for this expense")

    I am getting the formula to work ALMOST correctly, when this happens:
    If the user has data in BE3 & BG3 and selects "US" in BI3 and "Yes" in BR3, they will get a message "You qualify for $25 per month" - PERFECT!!
    If the user has data in BE3 & BG3 and selects "Canada" in BI3 and "Yes" in BR3, they will get a message "You qualify for $30 per month" - PERFECT!!

    But if...
    If the user has data in BE3 & BG3 and selects "US" in BI3 and "No" in BR3, I get a message: "FALSE" - NOT PERFECT, but liveable!!

    Or if...
    If the user has data in BE3 & BG3 and selects "Canada" in BI3 and "No" in BR3, I get a message: "You qualify for $30 per month" - WRONG!
    If there is no data in BG3: "FALSE" - NOT PERFECT, but liveable!!
    If there is no data in BE3: "You do not qualify for this expense" - I want this message to show up each time, one of the boxes is blank, or "No" is selected

    I know I have just something miswired... can anyone please help? I have been trying variations of this all day...

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: IF formula that shows "FALSE" instead of prepared text, and a few bugs

    without having a sample file to test this on, try the following and let me know how it works for you...

    =IF(or(br4="No",AND(BE3="",BG3=""))"You do not qualify for this expense",
    IF(AND(BI3="us",BR3="yes"),"Up to $25 per month",IF(and(BI3="canada",BR3="yes"),"Up to $30 per month","")))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    Irving, TX
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: IF formula that shows "FALSE" instead of prepared text, and a few bugs

    Hi there!

    Thanks for trying, but it didn't quite work.
    I have created a sample file, and highlighted the fields I am referring to, since they are no longer: BE3, BG3, BI3 or BR3.

    Sample Audit Steps for Excel Forum 6.27.2012.xlsx

    I hope I attached this correctly.

    Your help is so greatly appreciated! I entered your formula into the first row, and you can see what it is doing.

    Annie

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: IF formula that shows "FALSE" instead of prepared text, and a few bugs

    Maybe

    Formula: copy to clipboard
    =IF(OR(BI3="",BR3=""),"",IF(OR(BR3="No",BE3="",BG3=""),"You do not qualify for this expense","You qualify for "&IF(BI3="Canada","$30","$25")&" per month"))

  5. #5
    Registered User
    Join Date
    06-19-2012
    Location
    Irving, TX
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: IF formula that shows "FALSE" instead of prepared text, and a few bugs

    Hi again,

    I tweaked the formula FDibbins created for me to:
    =IF(OR(BR3="No",OR(BE3="",BG3="")),"You do not qualify for this expense",IF(AND(BI3="us",BR3="yes"),"Up to $25 per month",IF(AND(BI3="canada",BR3="yes"),"Up to $30 per month","You do not qualify for this expense")))

    And now it works perfectly!!

    Thank you guys so much!!!
    Annie

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: IF formula that shows "FALSE" instead of prepared text, and a few bugs

    im glad i was able to help, and even happier that you managed to get it all worked out the way you wanted

+ 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