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 only some values



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2004, 09:38 AM
Andreas
external usenet poster
 
Posts: n/a
Default Average only some values

Hi

My workbook contains, amongs other, a column with values for the
temperature in a pipe, and three other columns with values indicating
the time three different machines has been on. I'd like to calculate
the average of all values in the first colum, but only the values
where any of the machine has been turned on.

For instance: The first colum contains the values {10,10,12,12,13},
the other contains the values (0,0,1,0,0), (1,0,0,0,0), (1,0,0,0,0).
Here the first average should be 11, because only the first and the
third value is of intrest.

How should I do that?
  #2  
Old February 18th, 2004, 10:06 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Average only some values

Hi
one way
=SUMPRODUCT(--(((B1:B5)+(C1:C5)+(D15))0),A1:A5)/SUMPRODUCT(--(((B1:B
5)+(C1:C5)+(D15))0))

--
Regards
Frank Kabel
Frankfurt, Germany

Andreas wrote:
Hi

My workbook contains, amongs other, a column with values for the
temperature in a pipe, and three other columns with values indicating
the time three different machines has been on. I'd like to calculate
the average of all values in the first colum, but only the values
where any of the machine has been turned on.

For instance: The first colum contains the values {10,10,12,12,13},
the other contains the values (0,0,1,0,0), (1,0,0,0,0), (1,0,0,0,0).
Here the first average should be 11, because only the first and the
third value is of intrest.

How should I do that?


  #3  
Old February 18th, 2004, 10:56 AM
Leo Heuser
external usenet poster
 
Posts: n/a
Default Average only some values

Hi

Another option:

=AVERAGE(IF(B2:B6+C2:C6+D26,A2:A6))

This is an array formula, and it must be entered with
ShiftCtrlEnter also if edited later. If done
correctly, Excel will display the formula in the formula
bar enclosed in curly brackets { }. Don't enter these
brackets yourself.

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Andreas" skrev i en meddelelse
m...
Hi

My workbook contains, amongs other, a column with values for the
temperature in a pipe, and three other columns with values indicating
the time three different machines has been on. I'd like to calculate
the average of all values in the first colum, but only the values
where any of the machine has been turned on.

For instance: The first colum contains the values {10,10,12,12,13},
the other contains the values (0,0,1,0,0), (1,0,0,0,0), (1,0,0,0,0).
Here the first average should be 11, because only the first and the
third value is of intrest.

How should I do that?



 




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 03:48 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.