Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sue
 
Posts: n/a
Default Sum/average numbers in column A dependant on value in column B

I would like to sum/average numbers in column A, only if for that row, the
value in column B is a certain value.
e.g. Average column A if value in column B is 1. Then again, average of
column A if value in column B is 2 etc.
A B
4 1
5 2
8 1
7 2
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Sum/average numbers in column A dependant on value in column B

=AVERAGE(IF(B1:B4=1,A1:A4))

entered with ctrl + shift & enter


--

Regards,

Peo Sjoblom


http://nwexcelsolutions.com



"Sue" wrote in message
...
I would like to sum/average numbers in column A, only if for that row, the
value in column B is a certain value.
e.g. Average column A if value in column B is 1. Then again, average of
column A if value in column B is 2 etc.
A B
4 1
5 2
8 1
7 2
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Zack Barresse
 
Posts: n/a
Default Sum/average numbers in column A dependant on value in column B

Hi Sue,

If you want to Sum, check out SUMIF. If you want to Average, you'll either
need a SumProduct or an array formula...

=Average(If(B1:B4=1,A1:A4))

Confirm this array formula with Ctrl + Shift + Enter.

HTH

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM


"Sue" wrote in message
...
I would like to sum/average numbers in column A, only if for that row, the
value in column B is a certain value.
e.g. Average column A if value in column B is 1. Then again, average of
column A if value in column B is 2 etc.
A B
4 1
5 2
8 1
7 2
Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Sum/average numbers in column A dependant on value in column B

=AVERAGE(IF($B$1:$B$10=1,$A$1:$A$10))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sue" wrote in message
...
I would like to sum/average numbers in column A, only if for that row, the
value in column B is a certain value.
e.g. Average column A if value in column B is 1. Then again, average of
column A if value in column B is 2 etc.
A B
4 1
5 2
8 1
7 2
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
How to add numbers in a column dependant on their colour 24 Jan 05 Excel Worksheet Functions 2 August 3rd 05 12:37 PM
Consecutive Numbers down a column not to Exceed 49 Nelson Excel Worksheet Functions 6 July 18th 05 09:32 PM
column filtering to match identical numbers sammc2 Excel Discussion (Misc queries) 1 July 14th 05 11:59 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
Average of numbers in column between to other numbers Ditandhischeese Excel Discussion (Misc queries) 2 March 31st 05 03:35 AM


All times are GMT +1. The time now is 09:42 AM.

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"