+ Reply to Thread
Results 1 to 9 of 9

How to find min/max of a range

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010 for Mac
    Posts
    60

    How to find min/max of a range

    Instead of having to go through each 6 digit code and find the max/min/median, how do I structure an if function within a max/min function to go through it and pull the max by code? Workbook attached. WHen I tried max if it gave me #VALUE! error.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: How to find min/max of a range

    Untested as excel is playing up - Will post example once it works but in the mean time use the following syntax

    =MAX(IF(CriteriaRange=Criteria,MaxRange))

    Entered with Ctrl Shift Ent
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  3. #3
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: How to find min/max of a range

    The NAs make this a bit more complex. In O2,
    =MIN(OFFSET($N$1,MATCH(M2,$M$2:$M$256,0),0,COUNTIF($M$2:$M$256,M2)))
    drag down.

    Should just need to change the MIN to MAX and MEDIAN for the other columns. This assumes your codes are grouped. If you can guarantee no NAs, then The Cman81's solution is cleaner (and could be modified with a check for NA).
    Last edited by Pauleyb; 08-22-2013 at 11:39 AM.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  4. #4
    Registered User
    Join Date
    08-05-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010 for Mac
    Posts
    60

    Re: How to find min/max of a range

    I don't see where this refers to the data on the first tab, from which I am trying to get the max/min for

  5. #5
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find min/max of a range

    max min of list.xlsx
    Try if this work for you
    Not sure if arrays works on MAC, if not I will find another solution
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    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.
    http://www.excelaris.co.uk

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to find min/max of a range

    For the max and min you can use pivot table.

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to find min/max of a range

    Hi,

    See if a Pivot Table answer that shows the Count, Min, Max and Average by ID is what you really want. NO FORMULAS NEEDED. All you have to do is learn a little about Pivots. Note - you also need to make your data a table. You have some merged cells in Row 1 that keeps it from being a table. I've Inserted a blank column (J?) to move the merged column heads off to the right so I could do a pivot on your data. See Sheet2 for my work.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  8. #8
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: How to find min/max of a range

    Quote Originally Posted by brandnew22 View Post
    I don't see where this refers to the data on the first tab, from which I am trying to get the max/min for
    Well, it wasn't clear what you wanted. In your original post, you do not mention where your source data is. In looking at the provided worksheet, the only MIN equations I saw were on the 'Sheet1' sheet and were referencing column N. Looked like you were defining the range by hand and were looking for an easier way to determine the range.

    Seriously, when you read through your original post, was it clear what you really wanted?

    Pauley

  9. #9
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to find min/max of a range

    AVERAGE is not a MEDIAN...
    Last edited by RobertMika; 08-22-2013 at 04:40 PM.

+ 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. Code to find named range doesn't find the correct field range?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2012, 05:54 PM
  2. [SOLVED] Using range.find to find two specific values in two columns
    By mhrub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 01:02 PM
  3. Range.Find to find column and place value in next available cell in one line
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 10:41 AM
  4. find row no. of particular cell in a range and find last entry in that row
    By VishalGupta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2011, 01:29 AM
  5. find, meet condition, sum range, deduce, find next
    By pinstripe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2007, 09:30 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