if statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 columns in a spreadsheet. Column A contains a date in format
11/30/2005. Column B contains a number. I need an If statement that will
return the median value of column B where the date in column A begins with 11.

Any thoughts appreciated!
 
=MEDIAN(IF(DAY(A1:A20)=11,B1:B20))

as an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I need to find all values in column A that begin with 11 not just row 1.
There will be several rows selected and I need the median value of column B
for all rows selected.
 
Oops, seeing the other guys post I see you are using US dates. My formula
should thus be

=MEDIAN(IF(MONTH(A1:A20)=11,B1:B20))

still an array formula.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thank you Bob, this looks like it will work. What is meant by "commit with
Ctrl-Shift-Enter"
 
It means that after you type in the formula, don't hit the Enter key, use
the Ctrl-Shift-Enter keys all together. The formula will then appear in the
formula bar like so

{=MEDIAN(IF(MONTH(A1:A20)=11,B1:B20))}

Excel puts in the braces.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top