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 - Disregard zero and numbers over 60?



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2010, 07:46 PM posted to microsoft.public.excel.worksheet.functions
Ted[_15_]
external usenet poster
 
Posts: 10
Default AVERAGE - Disregard zero and numbers over 60?

I need to compute averages of several rows of numbers. Every cell contains
a number. None are negative.

I want the average to disregard '0' and any number over 60.

Thanks in advance.



  #2  
Old February 12th, 2010, 08:34 PM posted to microsoft.public.excel.worksheet.functions
Luke M
external usenet poster
 
Posts: 2,672
Default AVERAGE - Disregard zero and numbers over 60?

Use an array** formula like this:

=AVERAGE(IF((A2:A60)*(A2:A660),A2:A6))

**Array formulas must be confirmed using Ctrl+Shift+Enter, not just Enter
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Ted" wrote:

I need to compute averages of several rows of numbers. Every cell contains
a number. None are negative.

I want the average to disregard '0' and any number over 60.

Thanks in advance.



.

  #3  
Old February 12th, 2010, 08:42 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default AVERAGE - Disregard zero and numbers over 60?

"Ted" wrote:
I need to compute averages of several rows of numbers.
Every cell contains a number. None are negative.
I want the average to disregard '0' and any number over 60.


I presume by '0', you really mean the number zero, not the text "0".

Try this array formula[*]:

=average(if((0A1:A100)*(A1:A100=60),A1:A100))

The "*" functions as AND. You cannot use the AND function itself in this
context.
[*] An array formula is committed by pressing ctrl+shift+Enter instead of
just Enter. You should see curly braces around the entire formula in the
Formula Bar, e.g. {=formula}. You cannot enter the curly braces yourself;
Excel inserts them to denote an array formula. If you make a mistake,
select the cell, press F2, edit as needed, and finally press
ctrl+shift+Enter.

  #4  
Old February 13th, 2010, 01:15 AM posted to microsoft.public.excel.worksheet.functions
Ted[_15_]
external usenet poster
 
Posts: 10
Default AVERAGE - Disregard zero and numbers over 60?

Perfect! Thank you both for your help!

"Joe User" joeu2004 wrote in message
...
"Ted" wrote:
I need to compute averages of several rows of numbers.
Every cell contains a number. None are negative.
I want the average to disregard '0' and any number over 60.


I presume by '0', you really mean the number zero, not the text "0".

Try this array formula[*]:

=average(if((0A1:A100)*(A1:A100=60),A1:A100))

The "*" functions as AND. You cannot use the AND function itself in this
context.

[*] An array formula is committed by pressing ctrl+shift+Enter instead of
just Enter. You should see curly braces around the entire formula in the
Formula Bar, e.g. {=formula}. You cannot enter the curly braces yourself;
Excel inserts them to denote an array formula. If you make a mistake,
select the cell, press F2, edit as needed, and finally press
ctrl+shift+Enter.


 




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 06:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.