median if

I

Irv1010

I am trying to get the median of a column depending on a further 2 columns
and I have been trying the following:

=MEDIAN(IF('Incl 0 LOS ''09'!O4:O13427="SJH8",IF('Incl 0 LOS
''09'!P4:p13427="May",'Incl 0 LOS ''09'!E4:E13427)))

There are different numbers in column O, SJH1, SJH2 etc. Column P is a date
formatted as mmmm and Column E is random digits ranging from 0-49. All I get
is a return of 0 when I try and enter it. If I try and Ctrl,Shift & Return I
get NUM error. Please help.
 
C

chg

Try this:

IF(Month(*where you wanna look*)=5, etc)

Did you by any chance want to do the formula like this: =if(and
(condition 1, conditon 2),do this if true,do this if false)
 
B

Bernie Deitrick

Try finding the month #

=MEDIAN(IF('Incl 0 LOS ''09'!O4:O13427="SJH8",IF(MONTH('Incl 0 LOS ''09'!P4:p13427)=5,'Incl 0 LOS
''09'!E4:E13427)))

HTH,
Bernie
MS Excel MVP
 
I

Irv1010

Very sorry but I'm still getting results of 0. If Iuse Array I get a #Ref
Error message
 
B

Bernie Deitrick

Irv,

You must have equal size ranges (same number of rows) and none of the comparisons can return errors.
Make sure that the line wrapping didn't include an extra space in your sheet name. Try renaming the
sheet - if the sheet names in the formula don't update, that is your error. Also, try the formula
without a sheet name, on a truncated range where you can control the entry easily, say

=MEDIAN(IF(O4:O7="SJH8",IF(MONTH(P4:p7)=5,E4:E7)))

entered using Ctrl-Shift-Enter.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top