Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dave roth
 
Posts: n/a
Default I need to return "" instead of 0

Hello:

My spreadsheet counts occurrences of incidents by month; I need to average
the number of actual occurrences without including zero values in the average.

the months row I want to average is populated by:
=IF(ISBLANK(Month_Vic_2005),"",COUNTIF(Month_Vic_2 005,"1"))

where Month_Vic_2005 is a named range that populates from another named
range that contains dates of occurrence. (COUNTIF "1" is replaced by 2,3 4,
etc. for later months in series.) I suspect the problem is that the ISBLANK
function is returning FALSE because the named range in question contains the
formula:
=IF(ISBLANK(Vic_Incident_Date_2005),"",MONTH(Vic_I ncident_Date_2005)).

Where there is no occurrence (say for April) I want the cell value blank,
not zero. The zeroes are causing the average function to return a false value
for the months for which I actually have data.

I'm probably approaching this from the wrong end; I've tried IF(range = 0,
0, <1, is null, NOT.


Tia for the help.

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Try

=AVERAGE(If(rng<0,rng))

which is an array formula, so commit with Ctrl-Shift-Enter

--
HTH

Bob Phillips

"dave roth" wrote in message
...
Hello:

My spreadsheet counts occurrences of incidents by month; I need to average
the number of actual occurrences without including zero values in the

average.

the months row I want to average is populated by:
=IF(ISBLANK(Month_Vic_2005),"",COUNTIF(Month_Vic_2 005,"1"))

where Month_Vic_2005 is a named range that populates from another named
range that contains dates of occurrence. (COUNTIF "1" is replaced by 2,3

4,
etc. for later months in series.) I suspect the problem is that the

ISBLANK
function is returning FALSE because the named range in question contains

the
formula:
=IF(ISBLANK(Vic_Incident_Date_2005),"",MONTH(Vic_I ncident_Date_2005)).

Where there is no occurrence (say for April) I want the cell value blank,
not zero. The zeroes are causing the average function to return a false

value
for the months for which I actually have data.

I'm probably approaching this from the wrong end; I've tried IF(range = 0,
0, <1, is null, NOT.


Tia for the help.



  #3   Report Post  
dave roth
 
Posts: n/a
Default

Hi:

Thanks so much; that's got the average correct.

"Bob Phillips" wrote:

Try

=AVERAGE(If(rng<0,rng))

which is an array formula, so commit with Ctrl-Shift-Enter

--
HTH

Bob Phillips

"dave roth" wrote in message
...
Hello:

My spreadsheet counts occurrences of incidents by month; I need to average
the number of actual occurrences without including zero values in the

average.

the months row I want to average is populated by:
=IF(ISBLANK(Month_Vic_2005),"",COUNTIF(Month_Vic_2 005,"1"))

where Month_Vic_2005 is a named range that populates from another named
range that contains dates of occurrence. (COUNTIF "1" is replaced by 2,3

4,
etc. for later months in series.) I suspect the problem is that the

ISBLANK
function is returning FALSE because the named range in question contains

the
formula:
=IF(ISBLANK(Vic_Incident_Date_2005),"",MONTH(Vic_I ncident_Date_2005)).

Where there is no occurrence (say for April) I want the cell value blank,
not zero. The zeroes are causing the average function to return a false

value
for the months for which I actually have data.

I'm probably approaching this from the wrong end; I've tried IF(range = 0,
0, <1, is null, NOT.


Tia for the help.




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 lowest quantity Pat Excel Worksheet Functions 2 March 8th 05 09:59 PM
RETURN intersecting value with known horizotal & vertical?? || cypher || Excel Worksheet Functions 4 February 2nd 05 09:27 PM
Can VLOOKUP return multiple answers based on several identical lo. jddtct Excel Worksheet Functions 3 January 11th 05 07:03 AM
Return the smallest value Donkey Excel Worksheet Functions 2 December 24th 04 10:10 PM
Return the end of month date from a date Steve F. Excel Worksheet Functions 3 October 28th 04 06:17 PM


All times are GMT +1. The time now is 06:57 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"