+ Reply to Thread
Results 1 to 8 of 8

IF AND OR Statement with 4 variables

  1. #1
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    IF AND OR Statement with 4 variables

    I am stuck on an IF formula using AND/OR with 4 criteria. I attempted to adapt a much smaller version of this formula, and it is not working. This is what I have:

    =IF(OR(AND($H$7="Y",$H$5>=1),AND($H$7="Y",$H$5="-"),AND($H$7="N",$H$5="-"),AND($H$7="N",$H$5>=1)),37.5,29,20.5,29)

    Cell H7 will contain either "Y" or "N"
    Cell H5 will contain a dollar amount or "-" (dollar amount if financed, and "-" is a cash sale)

    This formula is supposed to calculate the recording fees based on the following information:

    H7 - Y, H5 - more than $1 = $37.50
    H7 - Y, H5 - "-" = $29.00
    H7 - N, H5 - More than $1 = $20.50
    H7 - N, H5 - "-" = $29.00

    Can someone help me to understand what I am doing wrong? Thanks in advance for all you help. As always it is greatly appreciated!
    ~*~ Sherry ~*~
    Poinciana, FL

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

    Re: IF AND OR Statement with 4 variables

    Try:

    =IF(H5="-",29,IF(H7="Y",37.5,20.5))
    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.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    10

    Thumbs up Re: IF AND OR Statement with 4 variables

    You really cleaned that up!

  4. #4
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    Re: IF AND OR Statement with 4 variables

    NBVC----

    Nope that does not work right for all the variables.

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

    Re: IF AND OR Statement with 4 variables

    When does it not work?

  6. #6
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    Re: IF AND OR Statement with 4 variables

    when the desired result is $29.00 it does not work properly.


    CORRECT H7 - Y, H5 - more than $1 = $37.50
    Displays $37.50 H7 - Y, H5 - "-" = $29.00
    CORRECT H7 - N, H5 - More than $1 = $20.50
    Displays $20.50 H7 - N, H5 - "-" = $29.00

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

    Re: IF AND OR Statement with 4 variables

    Maybe it's not a dash, and it's a 0 formatting as Accounting?

    Try:


    =IF(H5=0,29,IF(H7="Y",37.5,20.5))

  8. #8
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    Re: IF AND OR Statement with 4 variables

    NBVC, that was it! It works perfectly! Thanks so much!

+ 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