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  

Average formula only works partially.....



 
 
Thread Tools Display Modes
  #1  
Old October 19th, 2009, 05:28 PM posted to microsoft.public.excel.worksheet.functions
acbel40
external usenet poster
 
Posts: 9
Default Average formula only works partially.....

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

  #2  
Old October 19th, 2009, 05:41 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Average formula only works partially.....

Try this:

=IF(SUM(M6:M17)=0,0,SUMIF(M6:M17,"0")/COUNTIF(M6:M17,"0"))

--
Biff
Microsoft Excel MVP


"acbel40" wrote in message
...
Whew..anyone can help me with this.I'd be truly grateful..

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all
zero's...then
it returns a blank (because it initially returned a #div/0 error)....I
tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 .IF they ALL have numbers greater than 0. If any of the 12
cells
has a 0.then I need to divide the sum of the 12 cells by the number of
cells
that actually have a whole number. If the column is all zero's.it needs to
have a zero in the total

I hope that ALL makes sense....



  #3  
Old October 19th, 2009, 05:53 PM posted to microsoft.public.excel.worksheet.functions
ryguy7272
external usenet poster
 
Posts: 1,593
Default Average formula only works partially.....

I would do something like this:
=IF(ISERROR(AVERAGE(IF($B$2:$B$1010,$B$2:$B$101) )),"",AVERAGE(IF($B$2:$B$1010,$B$2:$B$101)))

Enter as Ctrl+Shift+Enter, not just enter.

Also, check this out:
http://www.ozgrid.com/Excel/average-without-zero.htm

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"acbel40" wrote:

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

  #4  
Old October 19th, 2009, 05:53 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Average formula only works partially.....

Please note that this is an array formula. you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

=IF(SUM(M6:M17),AVERAGE(IF(M6:M170,M6:M17)),0)

If this post helps click Yes
---------------
Jacob Skaria


"acbel40" wrote:

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

  #5  
Old October 19th, 2009, 06:56 PM posted to microsoft.public.excel.worksheet.functions
acbel40
external usenet poster
 
Posts: 9
Default Average formula only works partially.....

Didn't work (I entered it as an array formula)....gave 0 answer in the column
that had whole numbers in it....and #value error on the zero column
"Jacob Skaria" wrote:

Please note that this is an array formula. you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

=IF(SUM(M6:M17),AVERAGE(IF(M6:M170,M6:M17)),0)

If this post helps click Yes
---------------
Jacob Skaria


"acbel40" wrote:

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

  #6  
Old October 19th, 2009, 07:01 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Average formula only works partially.....

In a fresh workbook enter the values in the range M6:M17 and try the
below...I have tested this..

If this post helps click Yes
---------------
Jacob Skaria


"acbel40" wrote:

Didn't work (I entered it as an array formula)....gave 0 answer in the column
that had whole numbers in it....and #value error on the zero column
"Jacob Skaria" wrote:

Please note that this is an array formula. you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

=IF(SUM(M6:M17),AVERAGE(IF(M6:M170,M6:M17)),0)

If this post helps click Yes
---------------
Jacob Skaria


"acbel40" wrote:

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

  #7  
Old October 19th, 2009, 07:02 PM posted to microsoft.public.excel.worksheet.functions
acbel40
external usenet poster
 
Posts: 9
Default Average formula only works partially.....

I apologize...it DID work....!!! THANK YOU very much!!!

"Jacob Skaria" wrote:

Please note that this is an array formula. you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

=IF(SUM(M6:M17),AVERAGE(IF(M6:M170,M6:M17)),0)

If this post helps click Yes
---------------
Jacob Skaria


"acbel40" wrote:

Whew….anyone can help me with this…I’d be truly grateful….

My spreadsheet has several columns that need to averaged on time spent on
that particular project per month. (example)

Project 1 Project 2
Jan 0 0
Feb 0 0
Mar 0 0
Apr 0 0
May 0 0
Jun 0 0
Jul 0 0
Aug 538 0
Sep 593 0
Oct 0 0
Nov 0 0
Dec 0 0

Aver Total 566 Blank s/b 0 Average Total for Year


I'm using this formula =IF(ISERROR(AVERAGE(IF(M6:M170,
M6:M17))),"",AVERAGE(IF(M6:M170, M6:M17))) on a multiple column
spreadsheet....it works great....however, if one column has all zero's...then
it returns a blank (because it initially returned a #div/0 error)....I tried
to change the formula to
=IF(ISERROR(AVERAGE(IF(M6:M170,I6:M17))),"0",AVE RAGE(IF(M6:M170,
M6:M17)))
inserting the 0 between the quotation marks; however, the column totals
with whole numbers end up with a zero as the total. Something is not quite
right about the formula...or I need to add more to the formula?

Basically my end result needs to divide the sum of those 12 cells in the
column by 12 …IF they ALL have numbers greater than 0. If any of the 12 cells
has a 0…then I need to divide the sum of the 12 cells by the number of cells
that actually have a whole number. If the column is all zero’s…it needs to
have a zero in the total

I hope that ALL makes sense....

 




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 12:19 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.