Median Date for time series data

salconflu

New Member
Joined
Mar 2, 2010
Messages
13
I have 30 years of time series data for which I would like to obtain approximate median dates for. The data looks like this:

[TABLE="width: 195"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Live[/TD]
[/TR]
[TR]
[TD="align: right"]12/27/1976[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1/9/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2/22/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2/23/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2/24/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2/27/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/1977[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3/2/1977[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3/3/1977[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]3/6/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3/7/1977[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3/8/1977[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD="align: right"]3/9/1977[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]3/10/1977[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]3/11/1977[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3/13/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3/21/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]3/23/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]4/12/1977[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]4/13/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]4/22/1977[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4/23/1977[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]

Looking for an elegant way in Excel to return the date once the median (cumulative total for live)/2 is reached. I have tried using dget but since more than one record exceeds the median threshold, this returns an error. Does anyone have a suggestion for achieving this?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
[TABLE="width: 775"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12/27/1976[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]grand tot[/TD]
[TD="align: right"]59[/TD]
[TD][/TD]
[TD]row 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]01/09/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]grand tot / 2[/TD]
[TD="align: right"]29.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/22/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/23/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/24/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2/27/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/01/1977[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/02/1977[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/03/1977[/TD]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]the formula putting the 1 in cell next to 24 is[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/06/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/07/1977[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"]=IF(AND(SUM($B$2:B13)>$H$3,SUM($C$1:C12)=0),1,"")[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/08/1977[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/09/1977[/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]easy to use offset match to find the 1
and move 2 to the left to return the date

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/10/1977[/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]03/11/1977[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3/13/1977[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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
Back
Top