I need a formula for a nine year data set

Redpoll19

New Member
Joined
Feb 8, 2008
Messages
18
I have nine years of daily data with a single value for each day. I need a formula that will give me the median for each calendar day of all nine years. That is, I need the median for nine values on Jan 1, 2,...,Dec 31.

Thanks for any help.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,941
Believe this should work, adjust it as needed, but 1 and 5 in there are for January 5th, but you could make those based on cell references.

=MEDIAN(IF((MONTH(A1:A10000)=1)*(DAY(A1:A10000)=5),B1:B10000))

This needs to be confirmed with control+shift+enter and not just enter.

Hope that helps.
 

BobUmlas

Well-known Member
Joined
Mar 14, 2002
Messages
1,181
put the calendar dates for one year in a column, say E and name the dates "Rg", then ctrl/shift/enter this formula:

=MEDIAN(IF(MONTH(rg)=MONTH(E2),IF(DAY(rg)=DAY(E2),OFFSET(rg,,1),""),""))

and fill down
 

MrRajKumar

Active Member
Joined
Jan 29, 2008
Messages
260
Hello,

Enter the calendar date in C1, then try this,

=MEDIAN(IF(TEXT(A1:A100,"mmmd")=TEXT(C1,"mmmd"),B1:B100))

Confirmed with Control+Shift+Enter.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,031
Messages
5,856,936
Members
431,841
Latest member
jaybeem

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top