LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #20   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Lowest repeatable number in a range

A minor thing first, the unary minus (the double -ve) is redundant in the
previous example.

This amended array entered formula should return an error (#NUM) if there
are no duplicate non-zero numbers

=SMALL(IF((COUNTIF(ref,ref)1)*ref,ref),1)

IOW if the resultant array is all non-numeric values, ie all FALSE's, Small
fails which I think is what you want (could include an additional IFERROR
etc).

but can it be made to return
the second smallest (non zero) number is there are no repeating ones to
return the lowest of?


I'm sure it's possible, but...?

If this snippet of the above formula -
(COUNTIF(ref,ref)1)*ref
is applied to this array
{0;0;1;1;1;2;7;7}
returns
{0;0;1;1;1;0;7;7}

Would need to return the second + 1 (third) samllest unique, in the above 7.

Might be worth asking over in excel.worksheetfunctions.

Re speed, normally cell formulas are faster but these formulas are doing a
lot more work than say the UDF posted by RBS. However if as you say you only
have 15 values to process the formula should be faster due to the overhead
of even the simplest UDF.

Regards,
Peter T

"Riddler" wrote in message
ups.com...
I like the simplicity of the array formula but can it be made to return
the second smallest (non zero) number is there are no repeating ones to
return the lowest of?
I played with it a bit but did not have any luck. I need to learn more
about array formulas. It looks like they have some great potential. As
for speed of them my array of numbers is usually less than 15 numbers
so it runs plenty fast enough.

Thanks
Scott





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeatable crash in Custom Error Bar range selection Daniel Trojan[_2_] Excel Discussion (Misc queries) 2 October 28th 13 04:34 AM
determine lowest number in several columns and replace lowest numb jerry Excel Worksheet Functions 1 June 18th 08 03:19 AM
Formula for displaying the lowest number of a range? coal_miner Excel Worksheet Functions 1 April 25th 05 02:54 PM
Range vs. lowest #, 2nd lowest #, 3rd lowest #, etc jwebb Excel Discussion (Misc queries) 2 March 9th 05 12:38 PM
How can I get the lowest price, second lowest etc. from a range o. Robin Excel Worksheet Functions 2 November 9th 04 12:23 PM


All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"