+ Reply to Thread
Results 1 to 6 of 6

Limit the result of a complex formula

  1. #1
    Registered User
    Join Date
    06-02-2019
    Location
    iligan city, philippines
    MS-Off Ver
    office 2016
    Posts
    15

    Limit the result of a complex formula

    Hello All,

    Good day!

    I need help in managing a formula please.

    This is my existing formula:


    =if(A4="Refunded",-20%*(15%*L4),L4-M4-N4)


    What I want to happen is make sure that if A4 is REFUNDED, that the result will not go over -5. I tried inserting the MAX function but I always end up with an error.

    Any help is much appreciated.

    Regards,
    Rod

  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,044

    Re: Limit the result of a complex formula

    Hi, welcome to the forum

    Try this...
    =if(A4="Refunded",max(-5,-20%*(15%*L4)),L4-M4-N4)
    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-02-2019
    Location
    iligan city, philippines
    MS-Off Ver
    office 2016
    Posts
    15

    Re: Limit the result of a complex formula

    Hello Ford,

    Good day!

    The formula was able to capture the MAX limit, however, something came up.

    Even if cell A4 does not contain the word "REFUNDED" it will capture the computation as if REFUNDED is there. Not sure if I am making sense but what I am trying to accomplish is create a formula wherein:

    =if(A4="Refunded",-20%*(15%*L4),L4-M4-N4)

    1. If the value of cell A# is NOT refunded, it will just compute as L#-M#-N4.
    2. If the value of cell A# is REFUNDED, it will compute as -20%*(15%*L#).
    3. The outcome if cell A# has REFUNDED should not exceed -5.

    Thank you for response. I appreciate it a lot.

    Sincerely,
    Rod

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Limit the result of a complex formula

    Hi Rod

    The Ford answer seems to be good
    See the file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-02-2019
    Location
    iligan city, philippines
    MS-Off Ver
    office 2016
    Posts
    15

    Re: Limit the result of a complex formula

    Hello Jose & Ford,

    Thank you so much for your help!

    I think there was just a glitch when I ran the formula. It is working ok now.

    Thank you! Thank you! Thank you!

    Regards,
    Rod

  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,044

    Re: Limit the result of a complex formula

    Happy to help

+ 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. Complex formula which works only when the first IF result is true??
    By cowhnica in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-26-2017, 08:45 PM
  2. [SOLVED] Auto sum of two or more cells that will limit the result to one digit.
    By paulallabaj070290 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-05-2017, 04:06 AM
  3. [SOLVED] Adding to a formula to limit the maximum result
    By Groovicles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-12-2013, 03:20 PM
  4. [SOLVED] Limit Results to the most common result
    By Solarman= in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 08-06-2013, 03:14 PM
  5. [SOLVED] Macro to populate cell based on the result of a complex formula
    By chris5058 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2012, 05:51 AM
  6. [SOLVED] Complex function....not sure how if the result I want is possible
    By Besseme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2006, 12:00 AM
  7. Formula to limit the size of a number result in a cell?
    By Pheasant Plucker® in forum Excel General
    Replies: 3
    Last Post: 02-02-2006, 07:20 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