ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate median for different groups (https://www.excelbanter.com/excel-discussion-misc-queries/9968-calculate-median-different-groups.html)

Daniel

Calculate median for different groups
 
Hi,

I have a file with data and some months on, the months
are as numbers, e.g. jan =1 , feb =2, . I would like to
be able to calcule the mean values based on data in col
a by month in col c. It would be good if i could have
just one formula that looks at the records in col c and
if it is say 1, than looks at the value in col and then
returns the median ov all records where colc is 1, then I
could do the same for the other months.

Hope this makes sense,

Cheers

Daniel

Jason Morin

Median or mean? Median for Jan.:

=MEDIAN(IF(C1:C100=1,A1:A100))

Array-entered, meaning press ctr/shift/enter.

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi,

I have a file with data and some months on, the months
are as numbers, e.g. jan =1 , feb =2, . I would like to
be able to calcule the mean values based on data in col
a by month in col c. It would be good if i could have
just one formula that looks at the records in col c and
if it is say 1, than looks at the value in col and then
returns the median ov all records where colc is 1, then I
could do the same for the other months.

Hope this makes sense,

Cheers

Daniel
.


JE McGimpsey

I suspect you'll ultimately be happier if you use a Pivot Table, which
can show the mean values for all months simultaneously:

http://peltiertech.com/Excel/Pivots/pivotstart.htm

But for an individual month you could use (array-entered):

=AVERAGE(IF(A1:A100=1,C1:C100,""))


In article ,
"Daniel" wrote:

Hi,

I have a file with data and some months on, the months
are as numbers, e.g. jan =1 , feb =2, . I would like to
be able to calcule the mean values based on data in col
a by month in col c. It would be good if i could have
just one formula that looks at the records in col c and
if it is say 1, than looks at the value in col and then
returns the median ov all records where colc is 1, then I
could do the same for the other months.

Hope this makes sense,

Cheers

Daniel



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

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