Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default #NUM! being returned instead of 0 or blank

I was told to use the formula below which allows the lowest number within a
range to be displayed discounting any zeros, this works fine.

=SMALL(D51:H51,COUNTIF(D51:H51,"<=0")+1)

The new problem that I am now having is that this is reliant upon a value
being present with which to calculate otherwise "#NUM!" is being returned. Is
there a way in which I can get the around this and have the returned value a
0 or just blank? The subsequent retuned value is then referenced into a
column but because "#NUM!" is displayed the column will not add together.

Thank you
--
Yorkie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 176
Default #NUM! being returned instead of 0 or blank

Add a check to the beginning of your function. Enter the following with
CTRL+SHIFT+ENTER now, as it is an array function:

=IF(AND(D51:H51=""),"",SMALL(D51:H51,COUNTIF(D51:H 51,"<=0")+1))

--
Regards,
Dave


"The Countryman" wrote:

I was told to use the formula below which allows the lowest number within a
range to be displayed discounting any zeros, this works fine.

=SMALL(D51:H51,COUNTIF(D51:H51,"<=0")+1)

The new problem that I am now having is that this is reliant upon a value
being present with which to calculate otherwise "#NUM!" is being returned. Is
there a way in which I can get the around this and have the returned value a
0 or just blank? The subsequent retuned value is then referenced into a
column but because "#NUM!" is displayed the column will not add together.

Thank you
--
Yorkie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default #NUM! being returned instead of 0 or blank

David Billigmeier wrote...
Add a check to the beginning of your function. Enter the following with
CTRL+SHIFT+ENTER now, as it is an array function:

=IF(AND(D51:H51=""),"",SMALL(D51:H51,COUNTIF(D51: H51,"<=0")+1))

....

Could still fubar if there were text in the range but no numbers. SMALL
(and LARGE) return #NUM! errors when there are fewer numbers in the
range or array given as first argument than the positive integer given
as second argument, so the proper error trap should be ensuring there's
at least one positive number in the range. Myself, I'd use

=IF(COUNTIF(rng,"0"),LARGE(rng,COUNTIF(rng,"0")) ,"")

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
Return Summed Count of Multiple Consecutive Numeric Values Sam via OfficeKB.com Excel Worksheet Functions 4 April 10th 06 10:35 PM
Sumif Cells Are Not Blank Powlaz Excel Worksheet Functions 12 March 15th 06 04:40 PM
CONCATENATE problem with blank cells roger_home Excel Discussion (Misc queries) 1 August 17th 05 09:18 PM
How to delete blank rows John Mansfield Excel Discussion (Misc queries) 3 April 27th 05 11:48 PM
blank cells R.VENKATARAMAN Excel Discussion (Misc queries) 1 April 6th 05 10:25 AM


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

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"