Is there a formula that will search a range and return the cell containing the lowest number but excluding zero.
Is there a formula that will search a range and return the cell containing the lowest number but excluding zero.
MIN(IF(A1:A10<>0,A1:A10)) entered using Ctrl+Shift+Enter does that for A1:A10.
Beau Nydal
Try this
This should return the smallest value in the range including negative numbers but excluding zero.![]()
Please Login or Register to view this content.
or, to allow for all the values being zero or blank and therefore avoid a #NUM! error
![]()
Please Login or Register to view this content.
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
Thanks for those Marcol, first time I've ever seen non-array formulae for this task.
Beau Nydal
I am not sure using SUM = 0 to test for all 0's is feasible if we assume the range could theoretically net to 0 (-2; 2)Originally Posted by Marcol
perhaps better to use COUNTIF(range,0)=COUNT(range) ? AVERAGE would be feasible test if you know you will always have min of 1 number in range
In this instance given OP use of XL2007 you could simply wrap an IFERROR around your original IF.
![]()
Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Aye Don, as ever I've gone off half-cocked.
Thanks for pointing that out.
Perhaps this could be another way.
As for IFERROR(), agreed, but there are still a fair amount of 2003 users about, so I tend to offer solutions to suit them.![]()
Please Login or Register to view this content.
I'm working on a theory I have, that once 2007 users, myself included, discover IFERROR(), it's never forgotten, so they will "fix" it themselves.
Thanks again.
SUMPRODUCT(ABS(A1:A20))=0 is another possibly test
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks