Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Conditional AVERAGE?

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in "K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Conditional AVERAGE?

One way (per your simplified example), array-entered (CTRL-SHIFT-ENTER
or CMD-RETURN):

=AVERAGE(IF(K1:K300=TRUE,G1:G300))


In article ,
Leonhardtk wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in "K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Conditional AVERAGE?

Perfect. But I forgot to include one piece. I also need to filter out rows
that have a value in X2:X300.

Eventually need to formula:

1. Average all the colums in G2:G300 where the value in K=TRUE and value in
X <"Cancelled"
2. Average all the colums in G2:G300 where the VALUE in K<TRUE and value
in X<"Cancelled"

Thanks again,

KSL.

"JE McGimpsey" wrote:

One way (per your simplified example), array-entered (CTRL-SHIFT-ENTER
or CMD-RETURN):

=AVERAGE(IF(K1:K300=TRUE,G1:G300))


In article ,
Leonhardtk wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in "K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Conditional AVERAGE?

Try

=AVERAGE(IF((K2:K300="Incident")*(X2:X300<"Cancel led"),G2:G300))



--


Regards,


Peo Sjoblom


"Leonhardtk" wrote in message
...
Perfect. But I forgot to include one piece. I also need to filter out
rows
that have a value in X2:X300.

Eventually need to formula:

1. Average all the colums in G2:G300 where the value in K=TRUE and value
in
X <"Cancelled"
2. Average all the colums in G2:G300 where the VALUE in K<TRUE and value
in X<"Cancelled"

Thanks again,

KSL.

"JE McGimpsey" wrote:

One way (per your simplified example), array-entered (CTRL-SHIFT-ENTER
or CMD-RETURN):

=AVERAGE(IF(K1:K300=TRUE,G1:G300))


In article ,
Leonhardtk wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in
"K"
for that row equals True. I then need to have a seperate average for
the
rows that contain False.

Appreciate any help on this.

KSL




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Conditional AVERAGE?

In a helper cell enter:
=IF(K2,G2,"") and copy down
just average the helper column; AVERAGE() ignores blanks

to average the false entries:
=IF(K2,"",G2)
--
Gary''s Student - gsnu200745


"Leonhardtk" wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in "K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Conditional AVERAGE?

Note that if there is anything else but TRUE or FALSE in K you formulas will
fail
If indeed the only options are TRUE or FALSE then JE's formula can be
changed to

=AVERAGE(IF(K1:K300,G1:G300))


--


Regards,


Peo Sjoblom



"Gary''s Student" wrote in message
...
In a helper cell enter:
=IF(K2,G2,"") and copy down
just average the helper column; AVERAGE() ignores blanks

to average the false entries:
=IF(K2,"",G2)
--
Gary''s Student - gsnu200745


"Leonhardtk" wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in
"K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Conditional AVERAGE?

There are other values; This value contains type of "trouble tickets".
K2:K300 can contain, "New", "Service", "Incident" and a couple others. I
want to Average for "Incident", and and Average for all but "incident"
Eventually, I'll probably want averages for each type.

Thanks.

Kevin

"Peo Sjoblom" wrote:

Note that if there is anything else but TRUE or FALSE in K you formulas will
fail
If indeed the only options are TRUE or FALSE then JE's formula can be
changed to

=AVERAGE(IF(K1:K300,G1:G300))


--


Regards,


Peo Sjoblom



"Gary''s Student" wrote in message
...
In a helper cell enter:
=IF(K2,G2,"") and copy down
just average the helper column; AVERAGE() ignores blanks

to average the false entries:
=IF(K2,"",G2)
--
Gary''s Student - gsnu200745


"Leonhardtk" wrote:

I have a Column G2:G300, which contains the difference between dates.

What I need to do is average only rows that have certain values.

To simplify, I K2:G300 only contains two values (True and False)
How do I do an Average of all the columns (G2:G300) where the value in
"K"
for that row equals True. I then need to have a seperate average for the
rows that contain False.

Appreciate any help on this.

KSL




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Conditional AVERAGE?

Change JE's formula to


=AVERAGE(IF(K1:K300="Incident",G1:G300))


and for all but Incident use

=AVERAGE(IF(K1:K300<"Incident",G1:G300))

Both entered with ctrl + shift & enter



--


Regards,


Peo Sjoblom



"Leonhardtk" wrote in message
...
There are other values; This value contains type of "trouble tickets".
K2:K300 can contain, "New", "Service", "Incident" and a couple others. I
want to Average for "Incident", and and Average for all but "incident"
Eventually, I'll probably want averages for each type.

Thanks.

Kevin



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
Conditional Average Excel_Learner Excel Discussion (Misc queries) 8 July 17th 07 11:47 AM
Conditional Average Fupp83 Excel Worksheet Functions 1 June 6th 07 10:08 PM
Conditional Average [email protected] Excel Worksheet Functions 4 April 3rd 07 11:53 PM
Conditional Average Jason Excel Worksheet Functions 5 August 3rd 06 01:51 PM
Conditional Average MEK911 Excel Discussion (Misc queries) 4 September 9th 05 05:45 PM


All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"