+ Reply to Thread
Results 1 to 11 of 11

Smallest number greater than zero in range with #num! error

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    michigan
    MS-Off Ver
    Excel 2003
    Posts
    61

    Smallest number greater than zero in range with #num! error

    I'm trying to calculate the smallest margins of victory for a fantasy football league.

    In a row I have the point difference between a player and their opponent. That number will be either positive (for a win) or negative (for a loss). I am trying to find the 4 smallest positive numbers out of that range (of 17 weeks) for each person.

    I have a formula that returns the number, but if brings back a #NUM! error if there aren't at least 4 wins for that person. This creates a problem further down the sheet where I'm trying to calculate the 5 smallest overall margins for the entire league of 10 teams.

    Here's the formula I have to return the 4th smallest positive number. The scores are in the range F202:V202. Is there a way of modifying it to give me a blank cell if there isn't a win?

    =SMALL(IF($F$202:$V$202>0,$F$202:$V$202, ""),4)

    Thanks for your help!
    Damian

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Smallest number greater than zero in range with #num! error

    Hi damianberry,

    Try using below formula:-

    {=IFERROR(SMALL(IF($F$202:$V$202>0,$F$202:$V$202, ""),4),"")}

    See attached :- smallest 4.xlsx


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    07-09-2012
    Location
    michigan
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Smallest number greater than zero in range with #num! error

    Dilipandey,

    I see it works in your sample, but it doesn't work in mine. I have excel 2003, unfortunately. Is this the reason why it doesn't work in mine? I made sure to type ctrl-alt-enter to put the {} around the formula.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Smallest number greater than zero in range with #num! error

    oh. ok... for 2003, use below function:-

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


    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    07-09-2012
    Location
    michigan
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Smallest number greater than zero in range with #num! error

    DILIPandey,

    I am afraid it still doesn't work. When I paste it in the cell or in the formula bar at the top, it returns the entire formula. Here's a copy of the sheet......


    Damian
    Attached Files Attached Files

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Smallest number greater than zero in range with #num! error

    Hi Damianberry,


    You need to enter it without curly brackets { }.. this will appear automatically when you press ctrl shift enter key combination.
    I hope you know about array formulas as you mentioned in your post#3 :-
    I made sure to type ctrl-alt-enter to put the {} around the formula.
    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Registered User
    Join Date
    07-09-2012
    Location
    michigan
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Smallest number greater than zero in range with #num! error

    DILIPandey,

    I don't mean to be a pest, but I got it to work for the 4th variable as you have shown, without brackets. I copied and pasted the formula for my 1st, 2nd and 3rd and they show blanks also. I changed the 2 "4"s in the formula to 1, 2 and 3, respectively, but they still show blank.

  8. #8
    Forum Contributor
    Join Date
    09-11-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2013
    Posts
    103

    Re: Smallest number greater than zero in range with #num! error

    Maybe you could try this,

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


    Above formula does not contain CSE formula (arrary).

    Above formula will return result as,
    - If there is no negative, return blank "".
    - Else, find the smallest (1)...

    If there are only 3 negatives, but there are 4 in your table, the 4th will show 0

    Hope this helps.
    Attached Files Attached Files
    Click * to reward me...
    Thank you...

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Smallest number greater than zero in range with #num! error

    Hi Daminanberry,

    I entered 3 in place of 4 in the formula, and I got the result.. so it's working for me.. see attached and check out yellow cells. thanks.

    SMALLVICTORY.xls

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  10. #10
    Registered User
    Join Date
    07-09-2012
    Location
    michigan
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Smallest number greater than zero in range with #num! error

    Hi DILIPandey,

    I looked at what you sent back. That works for 1, 2 and 3 now as you say, but the 4th returns a value error...and that is the problem I had from the start.

    Damian
    Attached Files Attached Files

  11. #11
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Smallest number greater than zero in range with #num! error

    But I checked this and found that you have changed the formula

    To

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


    FROM

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

    Enter it with ctrl shift enter.



    I checked this and it is working for 4 as well ... thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Last edited by dilipandey; 11-08-2012 at 03:08 AM. Reason: formula tag

+ 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