Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Finding a Minimum Number other than Zero within a Range

Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.

Dan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Finding a Minimum Number other than Zero within a Range

On Apr 22, 9:06 am, cardan wrote:
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.

Dan


Hi Dan,

This array formula seems to work on A1:A100 for example...

=MIN(IF(A1:A100<0,A1:A100))

After typing in the formula it has to be entered by pressing Ctrl +
Shift + Enter. After doing that it Excel will place it in curly
brackets.

Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 329
Default Finding a Minimum Number other than Zero within a Range

Hi Cardan,

Here's a worksheet array formula to do the job:
=MIN(IF(A1:A100,A1:A10))
Simply copy the formula into your worksheet, change 'A1:A10' to your source range, and press Ctrl-Shift-Enter.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"cardan" wrote in message oups.com...
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.

Dan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Finding a Minimum Number other than Zero within a Range

Cardan,

Assuming the range is A1:A100, this formula will give the smallest value and
ignores 0s and blanks.

=SMALL(A1:A100,COUNTIF(A1:A100,0)+IF(COUNTBLANK(A1 :A100)0,1,0))


--
Hope that helps.

Vergel Adriano


"cardan" wrote:

Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.

Dan


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Finding a Minimum Number other than Zero within a Range

On Apr 21, 4:56 pm, Vergel Adriano
wrote:
Cardan,

Assuming the range is A1:A100, this formula will give the smallest value and
ignores 0s and blanks.

=SMALL(A1:A100,COUNTIF(A1:A100,0)+IF(COUNTBLANK(A1 :A100)0,1,0))

--
Hope that helps.

Vergel Adriano



"cardan" wrote:
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.


Dan- Hide quoted text -


- Show quoted text -


Thank you for the response. I tried the formula but I still get zero.
I reformatted the columns to mine but I still get zero. I have the
cells formatted as dates, but they do equal zero so it should work. I
may want to keep away from the arrays that were suggested above. Any
suggestions? Thanks again!



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Finding a Minimum Number other than Zero within a Range

Cardan,

I formatted column A as date. Then entered the following values, rows 1 to 5:

1/1/2007
1/1/2006
1/1/2005
0
0


Then, I entered the formula in B1 and formatted it as date. It showed
1/1/2005 which is the smallest date ignoring the 0s and blanks...

Perhaps if you could give some more details on what your data looks like and
how you're entering the formulas...



--
Hope that helps.

Vergel Adriano


"cardan" wrote:

On Apr 21, 4:56 pm, Vergel Adriano
wrote:
Cardan,

Assuming the range is A1:A100, this formula will give the smallest value and
ignores 0s and blanks.

=SMALL(A1:A100,COUNTIF(A1:A100,0)+IF(COUNTBLANK(A1 :A100)0,1,0))

--
Hope that helps.

Vergel Adriano



"cardan" wrote:
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.


Dan- Hide quoted text -


- Show quoted text -


Thank you for the response. I tried the formula but I still get zero.
I reformatted the columns to mine but I still get zero. I have the
cells formatted as dates, but they do equal zero so it should work. I
may want to keep away from the arrays that were suggested above. Any
suggestions? Thanks again!


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Finding a Minimum Number other than Zero within a Range

On Apr 21, 6:02 pm, Vergel Adriano
wrote:
Cardan,

I formatted column A as date. Then entered the following values, rows 1 to 5:

1/1/2007
1/1/2006
1/1/2005
0
0

Then, I entered the formula in B1 and formatted it as date. It showed
1/1/2005 which is the smallest date ignoring the 0s and blanks...

Perhaps if you could give some more details on what your data looks like and
how you're entering the formulas...

--
Hope that helps.

Vergel Adriano



"cardan" wrote:
On Apr 21, 4:56 pm, Vergel Adriano
wrote:
Cardan,


Assuming the range is A1:A100, this formula will give the smallest value and
ignores 0s and blanks.


=SMALL(A1:A100,COUNTIF(A1:A100,0)+IF(COUNTBLANK(A1 :A100)0,1,0))


--
Hope that helps.


Vergel Adriano


"cardan" wrote:
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.


Dan- Hide quoted text -


- Show quoted text -


Thank you for the response. I tried the formula but I still get zero.
I reformatted the columns to mine but I still get zero. I have the
cells formatted as dates, but they do equal zero so it should work. I
may want to keep away from the arrays that were suggested above. Any
suggestions? Thanks again!- Hide quoted text -


- Show quoted text -


Hi Vergel, I tried your formula with just hard coded dates and still
recieved 0 or 1/0/00. In my original range, my zeros show up as
1/0/00. I don't think this should have an effect. Could I not have an
Add-on activated or something? Thanks again.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Finding a Minimum Number other than Zero within a Range

"cardan" wrote in message
oups.com...
Hello All, I am trying to find the minimum number in a column range.
This range contains formulas that return a positive value or a 0. I am
trying to find the minimum number other than 0. I tried to rewrite the
formula so it would return "" other than 0. This works, however it
causes the VALUE error on other cells that are linked to this range
since there are no values. Is there a way to find the minimum above
zero? Any help would be greatly apprieciated! Thank you.



what about not to search min() in original range, but in "temp" range, which
have formula for *corrected* values.
like:

=if(a1=0,10^6,a1)

assuming that 10^6 is surely greater than minimal number other than zero




Reply
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
finding maximum, minimum in a range consists both Positive and Negative numbers Praveen Excel Worksheet Functions 3 May 4th 23 07:45 PM
Finding Minimum but if same number repeats in the range, then find MIK Excel Discussion (Misc queries) 1 January 9th 09 03:13 AM
Get a row number of range where a value is between minimum and max Tetsuya Oguma Excel Worksheet Functions 2 October 1st 08 01:00 AM
Finding cell address for minimum number Tre_cool[_11_] Excel Programming 9 October 18th 05 06:56 PM
Finding the minimum in a selected number of rows of the same colum Mark Rugers Excel Worksheet Functions 5 July 20th 05 10:37 PM


All times are GMT +1. The time now is 09:35 AM.

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

About Us

"It's about Microsoft Excel"