+ Reply to Thread
Results 1 to 9 of 9

MIN function not working on result of calculated cell

  1. #1
    Registered User
    Join Date
    08-19-2013
    Location
    Oviedo, FL
    MS-Off Ver
    Excel 2010
    Posts
    21

    MIN function not working on result of calculated cell

    I'm trying to use the MIN function to extract 3-4 lowest scores in a column. It works fine when values have been inserted without a formula. The cell I want to use MIN on is a number that is the result of a calculation. I've been searching to find what I need to add to my MIN formula to make this happen. See columns E and F in attached spreadsheet.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: MIN function not working on result of calculated cell

    There are 2 zeroes in col C so small(..,1)=0 and small(..,2)=0 and small(..,3)=68 and so on. If you want to exclude the 0's type in this formula in col C
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: MIN function not working on result of calculated cell

    Try

    =SMALL(C$7:C$18,1+COUNTIF(C$7:C$18,0))

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: MIN function not working on result of calculated cell

    This in E5 - =SMALL(A$5:A$18,ROW()-4)
    This in F5 - =SMALL(C$5:C$18,ROW()-4+COUNTIF(C5:C18,"<1"))

    Copy both down...

  5. #5
    Registered User
    Join Date
    08-19-2013
    Location
    Oviedo, FL
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: MIN function not working on result of calculated cell

    I appreciate replies from all -- rcm and Jonmo1, included. I used BadlySpelledBuoy's suggestion and it worked perfectly. Thank you, thank you, thank you! I don't understand the reason for "-4". Please explain.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: MIN function not working on result of calculated cell

    In the formulas you had originally you had to change the last argument of the SMALL function each time from 1 to 2 to 3 to 4 as you looked for the 1st, 2nd, 3rd and 4th smallest numbers.

    By using ROW()-X (where X is a number that fits in with your data (more about that in a minute)) you can just put the formula in once and drag down, without the need to individually amend each formula.

    In the example workbook your data starts in row 5. So ROW()-4 in this row returns 1 (as per your original formula). When copied down to row 6 ROW()-4 returns 2, in row 7 it will return 3... and you can see where this is going I'm sure.

    So if your data started in row 10 you would use ROW()-9 and copy down. If it started in row 1 you would just use ROW().

    Perhaps a little overkill for looking up 4 values, but if you were looking up the smallest 100 values on a much larger dataset, you would appreciate this approach.

    Does that help explain at all?

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: MIN function not working on result of calculated cell

    Quote Originally Posted by BadlySpelledBuoy View Post
    By using ROW()-X (where X is a number that fits in with your data (more about that in a minute))

    In the example workbook your data starts in row 5. So ROW()-4 in this row returns 1 (as per your original formula).
    I like to use ROWS(A$1:A1) instead of ROW()-x
    It incriments to A$1:A2 to A$1:A3 etc.. as it's dragged down.

    This way it always begins with 1 regardless of the row you enter the formula on.
    You don't have to 'think' about which row you're on and what x should be..

    And it will still = 1 even if a row is inserted above the formula.

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: MIN function not working on result of calculated cell

    Quote Originally Posted by Jonmo1 View Post
    I like to use ROWS(A$1:A1) instead of ROW()-x
    It incriments to A$1:A2 to A$1:A3 etc.. as it's dragged down.

    This way it always begins with 1 regardless of the row you enter the formula on.
    You don't have to 'think' about which row you're on and what x should be..

    And it will still = 1 even if a row is inserted above the formula.
    Yes, that is a much better approach, and the one I personally use. But I didn't want to make things more complicated than necessary

  9. #9
    Registered User
    Join Date
    08-19-2013
    Location
    Oviedo, FL
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: MIN function not working on result of calculated cell

    Thanks, again. I can't mark this as being solved yet. Will have to look over the comments and experiment when I have more time. Your solutions were good for my sample sheet (the one I attached), but I'm having a problem in my larger sheet. I can get back to this in a day or two. Am late for bridge!! Maybe I'll have better luck with that than this!

+ 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. IF function not working when I make a ratio the then result
    By HarvardMajesty in forum Excel General
    Replies: 3
    Last Post: 08-02-2013, 01:38 PM
  2. Replies: 9
    Last Post: 09-05-2012, 10:23 AM
  3. Replies: 8
    Last Post: 12-09-2011, 11:15 PM
  4. Validate result in a calculated cell
    By judasdac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-12-2009, 11:32 AM
  5. PivotTable:Using a calculated field result in another calculated f
    By Alice in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-08-2006, 12:25 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