ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to average values based on a condition in another column (https://www.excelbanter.com/excel-worksheet-functions/119077-how-average-values-based-condition-another-column.html)

Ken99

How to average values based on a condition in another column
 
I have a spreadsheet with a number from 1-20 in column A for each record
(row). I have another number in column P representing a number of days for
each record. I need a summary formula which does the following:

For all the rows in column A that are less than 11 (have values from 1-10),
average all of the matching rows in column P.


Bob Phillips

How to average values based on a condition in another column
 
=AVERAGE(IF(A1:A100<11,P1:P100))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ken99" wrote in message
...
I have a spreadsheet with a number from 1-20 in column A for each record
(row). I have another number in column P representing a number of days

for
each record. I need a summary formula which does the following:

For all the rows in column A that are less than 11 (have values from

1-10),
average all of the matching rows in column P.




Ken99

How to average values based on a condition in another column
 


"Ken99" wrote:

I have a spreadsheet with a number from 1-20 in column A for each record
(row). I have another number in column P representing a number of days for
each record. I need a summary formula which does the following:

For all the rows in column A that are less than 11 (have values from 1-10),
average all of the matching rows in column P.

Thanks Bob--this was right on and solved the problem immediately.

--Ken


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

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