Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default formula for adding and averaging

I have 5 different columns entitled Sex, Age, Bed Time, Wake Up, and Total
Sleep. In the Sex column (column E) I have entered either "m" or "f" for male
or female. Four columns to the right of this (column I) is the column called
"Total Sleep." My question is I want to take the average of the cells in
Column I ("total sleep") only if in Column E ("Sex") there is an "m" present.
Can you tell me the formula to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default formula for adding and averaging

=AVERAGE(IF(E2:E500="m",I2:I500))

entered with ctrl + shift & enter


you need to specify the range unless you have Excel 2007

since you probably want to use other criteria it is best to use


=AVERAGE(IF(E2:E500=M2,I2:I500))

where M2 would be a cell (any cell that is not occupied already) where you
would put the
criteria. That way you don't need to edit the formula when changing the
criteria



--


Regards,


Peo Sjoblom

"frequency function with decimals"
ft.com wrote in message
...
I have 5 different columns entitled Sex, Age, Bed Time, Wake Up, and Total
Sleep. In the Sex column (column E) I have entered either "m" or "f" for
male
or female. Four columns to the right of this (column I) is the column
called
"Total Sleep." My question is I want to take the average of the cells in
Column I ("total sleep") only if in Column E ("Sex") there is an "m"
present.
Can you tell me the formula to do this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default formula for adding and averaging

One way;

=Sumif(E:E,"m",I:I)/Countif(E:E,"m")


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"frequency function with decimals"
ft.com wrote in message
...
I have 5 different columns entitled Sex, Age, Bed Time, Wake Up, and Total
Sleep. In the Sex column (column E) I have entered either "m" or "f" for
male
or female. Four columns to the right of this (column I) is the column
called
"Total Sleep." My question is I want to take the average of the cells in
Column I ("total sleep") only if in Column E ("Sex") there is an "m"
present.
Can you tell me the formula to do this?



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
problem with an averaging formula Bobbie Excel Discussion (Misc queries) 2 January 19th 08 12:16 PM
Adding single cell in multiple worksheet then averaging maril Excel Worksheet Functions 5 January 15th 08 07:40 PM
Averaging with a formula scubab Excel Discussion (Misc queries) 5 August 22nd 06 05:51 AM
Averaging Array Formula Michael Link Excel Discussion (Misc queries) 5 December 14th 05 10:41 PM
Adding/Averaging Times in Excel JD Excel Discussion (Misc queries) 2 January 5th 05 05:07 PM


All times are GMT +1. The time now is 02:58 PM.

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"