Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vinnie123
 
Posts: n/a
Default calculation a average dependated of values in seperate column

Hi everyone. I've a spreadsheet with one column (eg. A1:a100)
containing a range of values (ages) and another column (B1:100) a value
of either 1 or 2 (representing males vs females).

How can a find the average of the cells A1:A100 that have a value of 1
in column B; ie. the average age of the males only.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default calculation a average dependated of values in seperate column

=AVERAGE(IF(B1:B100=1,A1:A100))

entered with ctrl + shift & enter, if there can be blanks in A

=AVERAGE(IF((A1:A100<"")*(B1:B100=1),A1:A100))

--
Regards,

Peo Sjoblom

Northwest Excel Solutions

Portland, Oregon




"vinnie123" wrote in message
oups.com...
Hi everyone. I've a spreadsheet with one column (eg. A1:a100)
containing a range of values (ages) and another column (B1:100) a value
of either 1 or 2 (representing males vs females).

How can a find the average of the cells A1:A100 that have a value of 1
in column B; ie. the average age of the males only.

Thanks


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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 04:56 AM
How can I average certain number of lowest values in a column? Philcw New Users to Excel 1 September 13th 05 05:58 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
How to average a column, but exclude zero AND negative values? KMHarpe Excel Discussion (Misc queries) 1 July 20th 05 10:06 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


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