PC Review


Reply
Thread Tools Rate Thread

Finding the three smallest numbers

 
 
Jan Kronsell
Guest
Posts: n/a
 
      13th May 2006
Hi NG

I can find the smallest number in a range by using SMALL, fx
=SMALL(A1:A10;1) and so on, but how can I find the smallest value, that are
not 0.

If I have the following numbers, 0, 1, 2, 0, 0.5, 0, 9, 2, 0, 1

I like this result =SMALL(range;1) = 0.5
Small(range;2) = 1, Small(range;3) = 1

Jan


 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      13th May 2006
Are your numbers always non-negative?

If yes:
=SMALL(A1:A10,1+COUNTIF(A1:A10,0))
=SMALL(A1:A10,2+COUNTIF(A1:A10,0))
=SMALL(A1:A10,3+COUNTIF(A1:A10,0))

If you can have negative numbers:
=SMALL(IF(A1:A10<>0,A1:A10),1)
=SMALL(IF(A1:A10<>0,A1:A10),2)
....

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

In fact, the array formula will work if the range only contains non-negative
numbers, too.

Jan Kronsell wrote:
>
> Hi NG
>
> I can find the smallest number in a range by using SMALL, fx
> =SMALL(A1:A10;1) and so on, but how can I find the smallest value, that are
> not 0.
>
> If I have the following numbers, 0, 1, 2, 0, 0.5, 0, 9, 2, 0, 1
>
> I like this result =SMALL(range;1) = 0.5
> Small(range;2) = 1, Small(range;3) = 1
>
> Jan


--

Dave Peterson
 
Reply With Quote
 
Jan Kronsell
Guest
Posts: n/a
 
      13th May 2006
Thank you. The array formula did the trick.

Jan

"Dave Peterson" <(E-Mail Removed)> skrev i en meddelelse
news:(E-Mail Removed)...
> Are your numbers always non-negative?
>
> If yes:
> =SMALL(A1:A10,1+COUNTIF(A1:A10,0))
> =SMALL(A1:A10,2+COUNTIF(A1:A10,0))
> =SMALL(A1:A10,3+COUNTIF(A1:A10,0))
>
> If you can have negative numbers:
> =SMALL(IF(A1:A10<>0,A1:A10),1)
> =SMALL(IF(A1:A10<>0,A1:A10),2)
> ...
>
> This is an array formula. Hit ctrl-shift-enter instead of enter. If you
> do it
> correctly, excel will wrap curly brackets {} around your formula. (don't
> type
> them yourself.)
>
> Adjust the range to match--but you can't use the whole column.
>
> In fact, the array formula will work if the range only contains
> non-negative
> numbers, too.
>
> Jan Kronsell wrote:
>>
>> Hi NG
>>
>> I can find the smallest number in a range by using SMALL, fx
>> =SMALL(A1:A10;1) and so on, but how can I find the smallest value, that
>> are
>> not 0.
>>
>> If I have the following numbers, 0, 1, 2, 0, 0.5, 0, 9, 2, 0, 1
>>
>> I like this result =SMALL(range;1) = 0.5
>> Small(range;2) = 1, Small(range;3) = 1
>>
>> Jan

>
> --
>
> Dave Peterson



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
finding 10 smallest numbers from last 20 input handicapper Microsoft Excel Worksheet Functions 8 3rd May 2010 03:29 PM
Finding Smallest Value =?Utf-8?B?UGhpbA==?= Microsoft Excel Misc 5 29th May 2006 02:27 AM
Finding smallest numbers Mike7 Microsoft Excel Programming 4 22nd Dec 2005 12:39 AM
Finding the smallest value Bazelstein Microsoft Excel Misc 1 21st Apr 2004 09:08 PM
Finding Smallest, 2nd Smallest Values Paul Corrado Microsoft Excel Worksheet Functions 2 25th Mar 2004 01:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 PM.