+ Reply to Thread
Results 1 to 5 of 5

Max/Min Range Cell Value in Excel

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Dallas, TX
    MS-Off Ver
    365 PC and Mac
    Posts
    64

    Max/Min Range Cell Value in Excel

    Hello- Thx in advance for the help.

    Is there an elegant way to create a maximum calculation range in excel. I'll try to setup an example:

    - Lets say Cell A5 calculates out to 30 (say the formula is =SUM(A1:A4)
    - But I'd like to have A5 value to be a minimum of 15 or a maximum of 25
    - Thus, in this example, A5 should be 25 (since A5's sum value is greater than 25)
    - But if A5's Sum value was 10, then it would show a value of 15
    - In otherwords, the values need to have a min and max (given range)

    I tried to play with nested if/then and Min/Max, but wasn't able to get it to do what I wanted.

    Any ideas? Hope I explained it ok.

    Thx!
    Last edited by MrBill; 05-26-2011 at 02:01 PM.

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

    Re: Max/Min Range Cell Value in Excel

    Try:

    =MEDIAN(15,25,SUM(A1:A4))
    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
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Max/Min Range Cell Value in Excel

    Try
    =IF(SUM(A1:A4)<15,15, MIN(SUM(A1:A4),25))
    Does that work for you?

    Edit: I like NBVC's better
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

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

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Max/Min Range Cell Value in Excel

    So if it's under 15, you want it to show 15, if it's over 25, you want it to show 25, and if it's anything in the middle, it shows the exact value, eg 16, 17, 21, 23, 24 etc.
    ?

    Edit:
    I think that's the first time I've ever seen the median function.
    Shnazzy.
    Last edited by mewingkitty; 05-26-2011 at 12:49 PM. Reason: LASER EYE CAT OF DOOM!!!
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  5. #5
    Registered User
    Join Date
    07-01-2010
    Location
    Dallas, TX
    MS-Off Ver
    365 PC and Mac
    Posts
    64

    Re: Max/Min Range Cell Value in Excel

    Thanks Everyone. The Median function is neato... never seen that before. Works like a charm.

    Thanks!

+ 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