Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
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!



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
average of different cells ignoring zero values awais Excel Discussion (Misc queries) 1 June 14th 08 11:45 PM
Criteria average ignoring blanks flumpuk Excel Discussion (Misc queries) 5 October 17th 07 11:39 AM
taking an average of every 30 cells [email protected] Excel Discussion (Misc queries) 4 August 30th 07 04:27 PM
Ignoring blank cells on getting an average Neil Excel Discussion (Misc queries) 6 July 18th 07 08:14 AM
Average ignoring Zeros Gary Excel Worksheet Functions 3 February 21st 07 02:20 AM


All times are GMT +1. The time now is 04:19 AM.

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"