Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Creating Average IF

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Creating Average IF

umm...wouldn't the answer be 18 (or zero, if nothing meets criteria)?

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))
--
Best Regards,

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


"AAA1986" wrote:

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Creating Average IF

If you meant not 03:06 but O3:O6, your formula would be
=SUMPRODUCT(--(O3:O6=18),I3:I6)/COUNTIF(O3:O6,18)
--
David Biddulph

"AAA1986" wrote in message
...
I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Creating Average IF

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))

simplify version:

=IF(COUNTIF(I3:I6,18),18,"")



"Luke M" wrote:

umm...wouldn't the answer be 18 (or zero, if nothing meets criteria)?

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))
--
Best Regards,

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


"AAA1986" wrote:

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Creating Average IF

No, let me try again. To simplify: for all records that equal "18" in column
B, I want the average of column A.

For example:

A B
1 4 18
2 2 17
3 4 18

In the above table, I would only want the averages of A1 and A3 because both
rows have "18" in the B column. The average here would be 4.

Thanks.

"Luke M" wrote:

umm...wouldn't the answer be 18 (or zero, if nothing meets criteria)?

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))
--
Best Regards,

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


"AAA1986" wrote:

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Creating Average IF

=SUMIF($B$1:$B$3,"=18",$A$1:$A$3)/COUNTIF($B$1:$B$3,"=18")

"AAA1986" wrote:

No, let me try again. To simplify: for all records that equal "18" in column
B, I want the average of column A.

For example:

A B
1 4 18
2 2 17
3 4 18

In the above table, I would only want the averages of A1 and A3 because both
rows have "18" in the B column. The average here would be 4.

Thanks.

"Luke M" wrote:

umm...wouldn't the answer be 18 (or zero, if nothing meets criteria)?

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))
--
Best Regards,

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


"AAA1986" wrote:

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Creating Average IF

Perfect! Thank you.

"Smoking" wrote:

=SUMIF($B$1:$B$3,"=18",$A$1:$A$3)/COUNTIF($B$1:$B$3,"=18")

"AAA1986" wrote:

No, let me try again. To simplify: for all records that equal "18" in column
B, I want the average of column A.

For example:

A B
1 4 18
2 2 17
3 4 18

In the above table, I would only want the averages of A1 and A3 because both
rows have "18" in the B column. The average here would be 4.

Thanks.

"Luke M" wrote:

umm...wouldn't the answer be 18 (or zero, if nothing meets criteria)?

=IF(COUNTIF(I3:I6,18)=0,"",SUMIF(I3:I6,18)/COUNTIF(I3:I6,18))
--
Best Regards,

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


"AAA1986" wrote:

I need the following function:

I want the average of I3:I6 only for records where 03:06 = 18.

Please help! Thanks in advance.

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
Creating If Statement not to include if O in average C Kreig Excel Discussion (Misc queries) 8 September 30th 08 08:48 PM
creating a running average Jay New Users to Excel 1 November 23rd 06 01:43 AM
Creating Average Line on chart flourboy Charts and Charting in Excel 1 July 25th 06 11:27 PM
creating an average? loopiloo Excel Discussion (Misc queries) 2 July 22nd 06 07:24 PM
help creating average formula Deb Excel Discussion (Misc queries) 6 May 13th 05 01:54 PM


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