#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Average function

I would like to average column C7 to C37 but would like to exclude
cells with just zeros in them.

Ex. AVERAGE(C7:C37)

Each cell from C7 to C37 has a Paste Link to it from another worksheet
so zeros appear in all the cells that have not yet been entered.

I get an incorrect average because its dividing by 31 rather than
cells numbers otherr than zero that have been entered.

Thanks,

Rube
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Average function

Try this:

=SUM(C7:C37)/COUNTIF(C7:C37,"<0")

OR...this ARRAY FORMULA
=AVERAGE(IF(C7:C37<0,C7:C37))

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

I would like to average column C7 to C37 but would like to exclude
cells with just zeros in them.

Ex. AVERAGE(C7:C37)

Each cell from C7 to C37 has a Paste Link to it from another worksheet
so zeros appear in all the cells that have not yet been entered.

I get an incorrect average because its dividing by 31 rather than
cells numbers otherr than zero that have been entered.

Thanks,

Rube

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Average function

On Thu, 4 Jan 2007 18:45:00 -0800, Ron Coderre
wrote:

Tried it. I got an Value error.

Try this:

=SUM(C7:C37)/COUNTIF(C7:C37,"<0")

OR...this ARRAY FORMULA
=AVERAGE(IF(C7:C37<0,C7:C37))

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

I would like to average column C7 to C37 but would like to exclude
cells with just zeros in them.

Ex. AVERAGE(C7:C37)

Each cell from C7 to C37 has a Paste Link to it from another worksheet
so zeros appear in all the cells that have not yet been entered.

I get an incorrect average because its dividing by 31 rather than
cells numbers otherr than zero that have been entered.

Thanks,

Rube


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Average function

Regarding:
Tried it. I got an Value error.


Sometimes less is more....but, in this case
less is definitely not enough.

I tested both formulas with the C7:C37 range containing
numerics (pos, neg, zero), text, and blanks without incident.
As long as the formulas are constructed properly
the problem lies in the contents of C7:C37.
Most likely there is an error value in the range.

Post back if you have more information or questions.

***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

On Thu, 4 Jan 2007 18:45:00 -0800, Ron Coderre
wrote:

Tried it. I got an Value error.

Try this:

=SUM(C7:C37)/COUNTIF(C7:C37,"<0")

OR...this ARRAY FORMULA
=AVERAGE(IF(C7:C37<0,C7:C37))

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

I would like to average column C7 to C37 but would like to exclude
cells with just zeros in them.

Ex. AVERAGE(C7:C37)

Each cell from C7 to C37 has a Paste Link to it from another worksheet
so zeros appear in all the cells that have not yet been entered.

I get an incorrect average because its dividing by 31 rather than
cells numbers otherr than zero that have been entered.

Thanks,

Rube



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Average function

I tried your SUM function formula and it worked. Sorry I should have
explained that I was getting a Value error with the Average function.
Not sure why if it works for you.

Thank you for your help.


On Fri, 5 Jan 2007 04:49:01 -0800, Ron Coderre
wrote:

Regarding:
Tried it. I got an Value error.


Sometimes less is more....but, in this case
less is definitely not enough.

I tested both formulas with the C7:C37 range containing
numerics (pos, neg, zero), text, and blanks without incident.
As long as the formulas are constructed properly
the problem lies in the contents of C7:C37.
Most likely there is an error value in the range.

Post back if you have more information or questions.

***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

On Thu, 4 Jan 2007 18:45:00 -0800, Ron Coderre
wrote:

Tried it. I got an Value error.

Try this:

=SUM(C7:C37)/COUNTIF(C7:C37,"<0")

OR...this ARRAY FORMULA
=AVERAGE(IF(C7:C37<0,C7:C37))

Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Rubix" wrote:

I would like to average column C7 to C37 but would like to exclude
cells with just zeros in them.

Ex. AVERAGE(C7:C37)

Each cell from C7 to C37 has a Paste Link to it from another worksheet
so zeros appear in all the cells that have not yet been entered.

I get an incorrect average because its dividing by 31 rather than
cells numbers otherr than zero that have been entered.

Thanks,

Rube




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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Using text for the range in AVERAGE function [email protected] Excel Worksheet Functions 4 July 8th 06 12:00 PM
Figuring daily average...function ??? Fish Excel Worksheet Functions 7 March 10th 06 05:26 PM
Average function assistance Larry L Excel Discussion (Misc queries) 8 August 26th 05 07:29 PM


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