Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Average Function that ignores zeros

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Average Function that ignores zeros

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Average Function that ignores zeros

Try the below array formula. Apply using Ctrl+Shift+Enter instead of Enter

=AVERAGE(IF(MOD(ROW(B10:B34),12)=10,IF(B10:B34<0, B10:B34)))

--
Jacob


"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Average Function that ignores zeros

That worked. Thanks!!

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Average Function that ignores zeros

Thanks again. One more question...Is there any easy way to hide a "#DIV/0"
error? As the spreadsheet is populated it will go away, so this is more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Average Function that ignores zeros

Thanks again! That worked. Can you give me brief explanation of how this
formula is constructed as I wold like to recreate it in other scenarios?

Thanks!

"Jacob Skaria" wrote:

Try the below array formula. Apply using Ctrl+Shift+Enter instead of Enter

=AVERAGE(IF(MOD(ROW(B10:B34),12)=10,IF(B10:B34<0, B10:B34)))

--
Jacob


"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Average Function that ignores zeros

What version of Excel are you using?

Will there be any negative numbers in the cells?

What result do you want to replace the error?

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message ...
Thanks again. One more question...Is there any easy way to hide a
"#DIV/0"
error? As the spreadsheet is populated it will go away, so this is more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and
ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore
any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All
of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Average Function that ignores zeros

I am using 2007. There are no negative numbers. I would prefer that the
cell be blank in place of the error code.

Thanks.

"T. Valko" wrote:

What version of Excel are you using?

Will there be any negative numbers in the cells?

What result do you want to replace the error?

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message ...
Thanks again. One more question...Is there any easy way to hide a
"#DIV/0"
error? As the spreadsheet is populated it will go away, so this is more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34) and
ignore
any zeros that exist. Each cell contains a formula that is gathering
information from a pivot table. I need the average formula to ignore
any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work. All
of the
solutions I have read related to this problem assume the cells are in a
continuous range (e.g. B10;B34).

Any help would be appreciated.



.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Average Function that ignores zeros

Try this...

=IFERROR(SUM(B10,B22,B34)/INDEX(FREQUENCY((B10,B22,B34),0),2),"")

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message ...
I am using 2007. There are no negative numbers. I would prefer that the
cell be blank in place of the error code.

Thanks.

"T. Valko" wrote:

What version of Excel are you using?

Will there be any negative numbers in the cells?

What result do you want to replace the error?

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message
...
Thanks again. One more question...Is there any easy way to hide a
"#DIV/0"
error? As the spreadsheet is populated it will go away, so this is
more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34)
and
ignore
any zeros that exist. Each cell contains a formula that is
gathering
information from a pivot table. I need the average formula to
ignore
any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work.
All
of the
solutions I have read related to this problem assume the cells are
in a
continuous range (e.g. B10;B34).

Any help would be appreciated.



.



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Average Function that ignores zeros

That worked. Thanks!

"T. Valko" wrote:

Try this...

=IFERROR(SUM(B10,B22,B34)/INDEX(FREQUENCY((B10,B22,B34),0),2),"")

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message ...
I am using 2007. There are no negative numbers. I would prefer that the
cell be blank in place of the error code.

Thanks.

"T. Valko" wrote:

What version of Excel are you using?

Will there be any negative numbers in the cells?

What result do you want to replace the error?

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message
...
Thanks again. One more question...Is there any easy way to hide a
"#DIV/0"
error? As the spreadsheet is populated it will go away, so this is
more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and B34)
and
ignore
any zeros that exist. Each cell contains a formula that is
gathering
information from a pivot table. I need the average formula to
ignore
any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work.
All
of the
solutions I have read related to this problem assume the cells are
in a
continuous range (e.g. B10;B34).

Any help would be appreciated.


.



.



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Average Function that ignores zeros

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message ...
That worked. Thanks!

"T. Valko" wrote:

Try this...

=IFERROR(SUM(B10,B22,B34)/INDEX(FREQUENCY((B10,B22,B34),0),2),"")

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"
wrote in message
...
I am using 2007. There are no negative numbers. I would prefer that
the
cell be blank in place of the error code.

Thanks.

"T. Valko" wrote:

What version of Excel are you using?

Will there be any negative numbers in the cells?

What result do you want to replace the error?

--
Biff
Microsoft Excel MVP


"Frustrated by Averages"

wrote in message
...
Thanks again. One more question...Is there any easy way to hide a
"#DIV/0"
error? As the spreadsheet is populated it will go away, so this is
more
viewing purposes while the spreadsheet is blank.

"Jacob Skaria" wrote:

Try..
=SUM(B10,B22,B34)/SUM(COUNTIF(INDIRECT({"B10","B22","B34"}),"0"))

--
Jacob


"Frustrated by Averages" wrote:

I am attempting to average three separate cells (B10, B22 and
B34)
and
ignore
any zeros that exist. Each cell contains a formula that is
gathering
information from a pivot table. I need the average formula to
ignore
any
zeros that may be in these cells when calculating the average.

I have tried many different formulas, but nothing seems to work.
All
of the
solutions I have read related to this problem assume the cells
are
in a
continuous range (e.g. B10;B34).

Any help would be appreciated.


.



.



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 Function (include Blank Cells and Zeros) [email protected] Excel Discussion (Misc queries) 17 June 27th 06 01:33 PM
VBA Function that ignores dates in a Holiday Table Sorbit Excel Worksheet Functions 0 January 17th 06 10:03 PM
Average a set of figures which ignores 0 entries Lorraine Excel Worksheet Functions 9 December 23rd 05 02:00 PM
Sum function which ignores hidden rows bucketheaduk Excel Worksheet Functions 2 October 12th 05 01:56 PM
How do i get an average that ignores blanks in the range of cells. ucastores Excel Worksheet Functions 7 November 11th 04 05:01 PM


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