Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In column A there is a series of numbers; for each number, in column B is its
associated category. For each grouping of adjacent rows with identical category, I want a formula in column C that will return the average of the numbers for that grouping. It could be, say, at the top of each grouping; for other cells the formula would return a blank. Not all groupings are equal in height. The same category may appear in more than one grouping; in this case, the formula will return the average for each separated grouping. Can I make a formula that will yield this result? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try this assuming that you want the whole column, otherwise adjust the
reference: [c1]=SUMIF($B:$B,B1,$A:$A)/COUNTIF($B:$B,B1) -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "hmm" wrote: In column A there is a series of numbers; for each number, in column B is its associated category. For each grouping of adjacent rows with identical category, I want a formula in column C that will return the average of the numbers for that grouping. It could be, say, at the top of each grouping; for other cells the formula would return a blank. Not all groupings are equal in height. The same category may appear in more than one grouping; in this case, the formula will return the average for each separated grouping. Can I make a formula that will yield this result? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Martin.
The formula works fine where you need to aveage all the cells in column A with the same value in their column B. However, I only want the average for continguous rows with the same value in column B; if the same column B value appears in a non-contiguous row, it would not be included. Is there such a formula? "Martin Fishlock" wrote: try this assuming that you want the whole column, otherwise adjust the reference: [c1]=SUMIF($B:$B,B1,$A:$A)/COUNTIF($B:$B,B1) -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "hmm" wrote: In column A there is a series of numbers; for each number, in column B is its associated category. For each grouping of adjacent rows with identical category, I want a formula in column C that will return the average of the numbers for that grouping. It could be, say, at the top of each grouping; for other cells the formula would return a blank. Not all groupings are equal in height. The same category may appear in more than one grouping; in this case, the formula will return the average for each separated grouping. Can I make a formula that will yield this result? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this
=AVERAGE(B1:INDEX(B1:$B$20,MIN(IF(A1:$A$20<A1,ROW (A1:$A$20)-1)))) which is an array formula, so commit with Ctrl-Shift-Enter, not just Enter -- --- HTH Bob (change the xxxx to gmail if mailing direct) "hmm" wrote in message ... Thanks Martin. The formula works fine where you need to aveage all the cells in column A with the same value in their column B. However, I only want the average for continguous rows with the same value in column B; if the same column B value appears in a non-contiguous row, it would not be included. Is there such a formula? "Martin Fishlock" wrote: try this assuming that you want the whole column, otherwise adjust the reference: [c1]=SUMIF($B:$B,B1,$A:$A)/COUNTIF($B:$B,B1) -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "hmm" wrote: In column A there is a series of numbers; for each number, in column B is its associated category. For each grouping of adjacent rows with identical category, I want a formula in column C that will return the average of the numbers for that grouping. It could be, say, at the top of each grouping; for other cells the formula would return a blank. Not all groupings are equal in height. The same category may appear in more than one grouping; in this case, the formula will return the average for each separated grouping. Can I make a formula that will yield this result? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function Key for Calculating Average? | Excel Worksheet Functions | |||
Average Array help with a formula | Excel Worksheet Functions | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions | |||
Need help w/ Weight Formula | Excel Discussion (Misc queries) | |||
Subtotal of Subtotal displays Grand Total in wrong row | Excel Worksheet Functions |