ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   averaging on an "if" or "sumproduct" (https://www.excelbanter.com/excel-worksheet-functions/59243-averaging-if-sumproduct.html)

Nancy

averaging on an "if" or "sumproduct"
 
I have the following:
Column A has names, column B has numbers.
I want to average the numbers in column B, only if the name is "Nick".

Thanks for any help you can give!

SteveG

averaging on an "if" or "sumproduct"
 

Nancy,

Type in this formula where you want the result.

=AVERAGE(IF(A2:A8="Nick",B2:B8,""))

This is an array formula so commit with Ctrl-Shift-Enter which will
result in

{=AVERAGE(IF(A2:A8="Nick",B2:B8,""))}



Cheers,

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=491554


Bob Phillips

averaging on an "if" or "sumproduct"
 
=AVERAGE(IF(A2:A20="Nick",B2:B20))

as an array formula, so commit with Ctrl-Shift-Enter


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nancy" wrote in message
...
I have the following:
Column A has names, column B has numbers.
I want to average the numbers in column B, only if the name is "Nick".

Thanks for any help you can give!





All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com