A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Taking Average ignoring #DIV/0! in the range...



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2009, 07:30 AM posted to microsoft.public.excel.worksheet.functions
Astro
external usenet poster
 
Posts: 13
Default Taking Average ignoring #DIV/0! in the range...

Currently if I use the average function for the months, it will show the
results to be "#DIV/0!".

What formula can I use such that when theres only data for 4 months, it will
only take average of 4 months and if theres 5 months data it will only take
average of 5 months and so on instead of showing me "#DIV/0!".

Please help. Thanks!

A B
1 January 100.00%
2 February 100.00%
3 March 100.00%
4 April 13.33%
5 May #DIV/0!
6 June #DIV/0!
7 July #DIV/0!
8 August #DIV/0!
9 September #DIV/0!
10 October #DIV/0!
11 November #DIV/0!
12 December #DIV/0!
13
14 Avg. (%) #DIV/0!

  #2  
Old April 16th, 2009, 07:59 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Taking Average ignoring #DIV/0! in the range...

The easiest way to handle this would be to change the formulas so they don't
return errors. For example:

=IF(ISERROR(your_formula),"",your_formula)

These will ignore the errors:

=IF(COUNT(B1:B12),SUMIF(B1:B12,"1E100")/COUNT(B1:B12),"")

This one is an array formula** :

=IF(COUNT(B1:B12),AVERAGE(IF(ISNUMBER(B1:B12),B1:B 12)),"")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Astro" wrote in message
...
Currently if I use the average function for the months, it will show the
results to be "#DIV/0!".

What formula can I use such that when theres only data for 4 months, it
will
only take average of 4 months and if theres 5 months data it will only
take
average of 5 months and so on instead of showing me "#DIV/0!".

Please help. Thanks!

A B
1 January 100.00%
2 February 100.00%
3 March 100.00%
4 April 13.33%
5 May #DIV/0!
6 June #DIV/0!
7 July #DIV/0!
8 August #DIV/0!
9 September #DIV/0!
10 October #DIV/0!
11 November #DIV/0!
12 December #DIV/0!
13
14 Avg. (%) #DIV/0!



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:30 AM.


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