+ Reply to Thread
Results 1 to 5 of 5

Thread: Logical Formula

  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    stamford, ct
    MS-Off Ver
    Excel 2003
    Posts
    5

    Logical Formula

    Is it possible to have the "value if true" or "value if false" be a formula?

    If there is data in the "Prepay" column, I'd like the "Total (before tax)" column to calculate with a 3% discount.

    Date Received T&S Pest Mgnt T&S Fert Landscape Total (before Tax) Prepay
    2.6.12 $620.00 $406.00 $1,026.00 Check

    So it would be something like this:
    =if(E5>0,[=1.097*sum(B5:C5)],[=sum(B5:C5)]

    Thank you!

  2. #2
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,348

    Re: Need help with Logical Formula

    mweiss1215,

    You would just leave out the subsequent = signs, so:
    =if(E5>0,1.097*sum(B5:C5),sum(B5:C5))

    As a side note, isn't 1.097 increasing it by 9.7% rather than decreasing it by 3%? So this might be more accurate:
    =if(E5>0,0.97*sum(B5:C5),sum(B5:C5))

    Also, since you're multiplying the same value ( sum(B5:C5) ) by either 1.097 (or 0.97) or 1 (so it returns itself unmodified), you could this condensed version:
    =if(E5>0,1.097,1)*sum(B5:C5)
    or, using 0.97:
    =if(E5>0,0.97,1)*sum(B5:C5)
    Last edited by tigeravatar; 02-06-2012 at 01:44 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    stamford, ct
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with Logical Formula

    Oops!It should be multiplied by .97 thanks. I tried the formulas provided below but they didnt work. See my notes in red

    Quote Originally Posted by tigeravatar View Post
    mweiss1215,

    You would just leave out the subsequent = signs, so:
    =if(E5>0,1.097*sum(B5:C5),sum(B5:C5))

    As a side note, isn't 1.097 increasing it by 9.7% rather than decreasing it by 3%? So this might be more accurate:
    =if(E5>0,0.97*sum(B5:C5),sum(B5:C5))

    When I tried the above formula, the resule was #VALUE
    Also, since you're multiplying the same value ( sum(B5:C5) ) by either 1.097 (or 0.97) or 1 (so it returns itself unmodified), you could this condensed version:
    =if(E5>0,1.097,1)*sum(B5:C5)
    or, using 0.97:
    =if(E5>0,0.97,1)*sum(B5:C5)
    When I tried the above formula, the result was #NAME

  4. #4
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,348

    Re: Need help with Logical Formula

    mweiss1215,

    I am unable to duplicate that issue. Attached is an example workbook based on the criteria you described. In columns F and V are the two formulas I suggested and they both calculate properly.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    07-14-2011
    Location
    stamford, ct
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need help with Logical Formula

    That worked! Thank you for the quick respones!!

    Quote Originally Posted by tigeravatar View Post
    mweiss1215,

    I am unable to duplicate that issue. Attached is an example workbook based on the criteria you described. In columns F and V are the two formulas I suggested and they both calculate properly.

+ 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.2.0