Hello!

In my workbook I have several worksheets. In cell B2 of every worksheet,
there is an average from the data in that worksheet. As this is a
template, some data is not entered yet, and some B2 cells show error
(div by 0). Now, I wanted to calculate the average from B2 cells of all
worksheets, but exclude all cells with errors.

My formula

=Average(Sheet1:Sheet12!B2)

How do I modify this to work?

Thakks
Peter

Re: Calculate average of a range, but exclude errors by Niek

Niek
Thu May 08 05:29:24 CDT 2008

Hi Peter,

Change the formulas of the cells that you want to average to

=IF(ISERROR(YourFormula),"",YourFormula)

or, even better, check for the divider being zero and generate "" if that is the case.

The AVERAGE() function ignores the "" cells.
--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Piotr" <erazm79WieszCoZrobic@tlen.pl> wrote in message news:fvu9ft$7oa$1@inews.gazeta.pl...
| Hello!
|
| In my workbook I have several worksheets. In cell B2 of every worksheet,
| there is an average from the data in that worksheet. As this is a
| template, some data is not entered yet, and some B2 cells show error
| (div by 0). Now, I wanted to calculate the average from B2 cells of all
| worksheets, but exclude all cells with errors.
|
| My formula
|
| =Average(Sheet1:Sheet12!B2)
|
| How do I modify this to work?
|
| Thakks
| Peter



RE: Calculate average of a range, but exclude errors by GarysStudent

GarysStudent
Thu May 08 05:41:04 CDT 2008

See Rosenfeld's comments in :

http://groups.google.com/group/microsoft.public.excel.worksheet.functions/browse_thread/thread/939b06ebd6a6b561/1f1ff77e04a97858?hl=en&lnk=st&q=average+exclude+errors+%3A*Excel

and adapt to your needs.
--
Gary''s Student - gsnu2007h


"Piotr" wrote:

> Hello!
>
> In my workbook I have several worksheets. In cell B2 of every worksheet,
> there is an average from the data in that worksheet. As this is a
> template, some data is not entered yet, and some B2 cells show error
> (div by 0). Now, I wanted to calculate the average from B2 cells of all
> worksheets, but exclude all cells with errors.
>
> My formula
>
> =Average(Sheet1:Sheet12!B2)
>
> How do I modify this to work?
>
> Thakks
> Peter
>