+ Reply to Thread
Results 1 to 5 of 5

Set a minimum and maximum

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2020
    Location
    amsterdam netherlands
    MS-Off Ver
    2019
    Posts
    2

    Set a minimum and maximum

    So i have a starting value and i need to add values to that, but the count may not go above 5000 and not go below 0.
    i know you can use these formulas for that:
    =MaX(0,(A5+A6))
    =MIN(5000,(A5+A6))
    I just cant find out how to use both limits in the same cell. is there any one who can help?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,372

    Re: Set a minimum and maximum

    Try:
    Formula: copy to clipboard
    =MAX(0,MIN(5000,(A5+A6)))
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-13-2020
    Location
    amsterdam netherlands
    MS-Off Ver
    2019
    Posts
    2

    Re: Set a minimum and maximum

    thanks alot!

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Set a minimum and maximum

    just combine

    =MIN(5000,MAX(0,A5+A6))

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,372

    Re: Set a minimum and maximum

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Maximum and Minimum (not of an array)
    By jimenvais in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-25-2017, 07:48 PM
  2. Minimum and maximum IF help
    By Dawndinosaur in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2016, 12:58 AM
  3. Minimum and maximum
    By ikke88 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-06-2015, 04:09 AM
  4. [SOLVED] Maximum and Minimum between two dates
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2015, 01:26 AM
  5. minimum, maximum and average help
    By cdscivic in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-13-2013, 06:44 PM
  6. Maximum and Minimum
    By lurchybold in forum Excel General
    Replies: 6
    Last Post: 10-13-2010, 11:04 AM
  7. [SOLVED] Recording maximum and minimum
    By F in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2006, 02:30 PM

Tags for this Thread

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