ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Median array formula (https://www.excelbanter.com/excel-worksheet-functions/112773-median-array-formula.html)

Ciara

Median array formula
 
Hi
I have had a look at the median posts and array posts but I am really
struggling with this as I have never built an array before.

I need to find the median length of stay for age/Psex/admissiontype for
each HRG (column A)
I have the following columns of data
A B C D E
F
HRG AgeRange PSex AdmissionType LOS Median LOS
A11 0-14 Male Elective 14
{ARRAY FORMULA??}

I imagine the formula with have to lookup colum G concatenation of
A2&B2&C2&D2 within the range of data (a2:e:100), then find the median
of those results? I just don't know how to put this together or if it
is possible the way I have the dataset laid out. Thanks for you help.


Ciara

Median array formula
 
Nevermind... I think I got it. Was less scary than I thought.
{=MEDIAN(IF($A$2:$A$2539=A2,$G$2:$G$2539))}
Ciara wrote:

Hi
I have had a look at the median posts and array posts but I am really
struggling with this as I have never built an array before.

I need to find the median length of stay for age/Psex/admissiontype for
each HRG (column A)
I have the following columns of data
A B C D E
F
HRG AgeRange PSex AdmissionType LOS Median LOS
A11 0-14 Male Elective 14
{ARRAY FORMULA??}

I imagine the formula with have to lookup colum G concatenation of
A2&B2&C2&D2 within the range of data (a2:e:100), then find the median
of those results? I just don't know how to put this together or if it
is possible the way I have the dataset laid out. Thanks for you help.




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

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