Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default SMALL function if 0

How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if function
but it doesn't give me the correct answer.
--
Louis
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default SMALL function if 0

array enter with ctrl+shift+enter
=MIN(IF(A1:A1000,A1:A100))

--
Don Guillett
SalesAid Software

"Louis" wrote in message
...
How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if
function
but it doesn't give me the correct answer.
--
Louis



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default SMALL function if 0

I would add a helper-column. Say the values are in column A, then cell B1
should be:
=if(A1<=0;99999999;A1)
Copy this formula to the whole column B

Getting the smallest number greater than 0 would now be
=min(B:B)

Not beautifull, but it works

Tieske

"Louis" wrote in message
...
How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if
function
but it doesn't give me the correct answer.
--
Louis



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default SMALL function if 0

Try this:

I'm assuming there are no negative numbers.

=SMALL(A1:A10,1+COUNTIF(A1:A10,0))

Biff

"Louis" wrote in message
...
How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if
function
but it doesn't give me the correct answer.
--
Louis



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SMALL function if 0

And building on Biff's formula:

If there are negative numbers:
=SMALL(A1:A10,1+COUNTIF(A1:A10,"<="&0))

and in case there are no positive numbers:
=IF(COUNTIF(A1:A10,""&0)=0,"No numbers larger than 0",
SMALL(A1:A10,1+COUNTIF(A1:A10,"<="&0)))



Biff wrote:

Try this:

I'm assuming there are no negative numbers.

=SMALL(A1:A10,1+COUNTIF(A1:A10,0))

Biff

"Louis" wrote in message
...
How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if
function
but it doesn't give me the correct answer.
--
Louis


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default SMALL function if 0

Thanks everyone. There are negative numbers to I will use that formula. The
helper column I should have thought up myself (but it never occurred to me);
but I never would have been able to produce the formula with the COUNTIF
without your help, even though I tried myself (unsuccessfully) before I
posted to the users group.
Thanks again,
--
Louis


"Dave Peterson" wrote:

And building on Biff's formula:

If there are negative numbers:
=SMALL(A1:A10,1+COUNTIF(A1:A10,"<="&0))

and in case there are no positive numbers:
=IF(COUNTIF(A1:A10,""&0)=0,"No numbers larger than 0",
SMALL(A1:A10,1+COUNTIF(A1:A10,"<="&0)))



Biff wrote:

Try this:

I'm assuming there are no negative numbers.

=SMALL(A1:A10,1+COUNTIF(A1:A10,0))

Biff

"Louis" wrote in message
...
How do I create a function that looks at a column of numbers and give show
the smallest number that is greater than zero? I tried a nested if
function
but it doesn't give me the correct answer.
--
Louis


--

Dave Peterson

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
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
What function to determine the second small integer from a list? Eric Excel Worksheet Functions 3 December 30th 05 11:56 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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

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"