+ Reply to Thread
Results 1 to 9 of 9

Limiting "=min" to positive answers

  1. #1
    Registered User
    Join Date
    05-20-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    4

    Limiting "=min" to positive answers

    Hi guys!

    I have an issue, hopefully it'll be easily resolved.

    In a cell "=min(F47:F48)" where F47 is 213 and F48 is -257.

    I want the answer to be positive, hence answer should be 213.

    Please see attached for more details.

    Thanks!

    ISSUE UPLOAD.xlsx

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Limiting "=min" to positive answers

    is there only two values always?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Limiting "=min" to positive answers

    Hi,

    Does this help?

    =ROUNDUP(MIN(ABS(F47),ABS(F48)),0)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Limiting "=min" to positive answers

    Try this Array Formula

    =MIN(IF(F47:F48>0,F47:F48))


    Array Formulas. are little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    05-20-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    4

    Re: Limiting "=min" to positive answers

    Sorry, yeah its actually only 2 values doesnt have to be F47:F48. Can be just F47,F48.

    I'll probably not try the array, as I would then need to add an explanation text box for this one cell.

    =ROUNDUP(MIN(ABS(F47),ABS(F48)),0) this works great! Thanks Sweep

    Thanks for the quick replies!
    Much appreciated

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Limiting "=min" to positive answers

    Surely Sweep's solution breaks down if the absolute value of the negative value is less than then absolute value of the positive value: -14 and +20

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Limiting "=min" to positive answers

    I agree with Glenn, I tested both using 110 and -100 and Sweep's returned a positive 100 which from your original post isn't what you wanted, Glenn's worked - for what it's worth.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Limiting "=min" to positive answers

    as there is some adversion to array formula and there are always only two values


    try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    not sure what you want to do when both are negative so i put in place holder text

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Limiting "=min" to positive answers

    Quote Originally Posted by TCH86 View Post
    I'll probably not try the array, as I would then need to add an explanation text box for this one cell.
    Quote Originally Posted by humdingaling View Post
    as there is some adversion to array formula
    Here's a normally entered (non-array) version as you're using Excel 2010...

    =IFERROR(AGGREGATE(15,6,F47:F48/(F47:F48>0),1),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. removing "Select All" and limiting filter choices in a Pivot table
    By jettabar99 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-25-2013, 09:07 AM
  2. [SOLVED] Count syntax for dividing # of "positive numbers" by "total numbers"
    By synses in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-18-2013, 09:06 PM
  3. Limiting Large Number displays to omit "hundreds"
    By NWheatley in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2012, 01:44 PM
  4. "IF" "AND" Statement to give 3 different answers
    By AllenMead in forum Excel General
    Replies: 4
    Last Post: 11-05-2010, 07:03 PM
  5. [SOLVED] Sum is positive value or "0" value. Negative value equals "0"
    By MorTTime in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2005, 08:06 PM

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