Trying to Get Median Based on Dates and Duplicate Values

monicamarie

Board Regular
Joined
Sep 2, 2008
Messages
70
Office Version
  1. 365
Hello,

I am trying to find a formula that will produce the results below for the median. My array table is sorted by the Purchase Date from ascending to descending. I am basically trying to find the median date range based on the Purchase Date where all unique values from the Inventory Code column are included. In my example below the date range I need is from 2/6/13 to 2/19/13. I'm not quite sure how else to explain this so hopefully I am making sense. Is there a formula that will produce this result? It doesn't have to be like the example below where the result is showing in column C as "Median". I just need to somehow come up with a way to get the answer 2/6/13 to 2/19/13.
Thank you.


1<o:p></o:p>
A<o:p></o:p>
B<o:p></o:p>
C<o:p></o:p>
2<o:p></o:p>
Inventory Code<o:p></o:p>
Purchase Date<o:p></o:p>
Result<o:p></o:p>
3<o:p></o:p>
19933146<o:p></o:p>
1/19/2013<o:p></o:p>
<o:p></o:p>
4<o:p></o:p>
36601355<o:p></o:p>
1/28/2013<o:p></o:p>
<o:p></o:p>
5<o:p></o:p>
19933146<o:p></o:p>
2/1/2013<o:p></o:p>
<o:p></o:p>
6<o:p></o:p>
19933146<o:p></o:p>
2/2/2013<o:p></o:p>
<o:p></o:p>
7<o:p></o:p>
30012569<o:p></o:p>
2/6/2013<o:p></o:p>
median<o:p></o:p>
8<o:p></o:p>
31258801<o:p></o:p>
2/6/2013<o:p></o:p>
median<o:p></o:p>
9<o:p></o:p>
36601355<o:p></o:p>
2/6/2013<o:p></o:p>
median<o:p></o:p>
10<o:p></o:p>
19933146<o:p></o:p>
2/15/2013<o:p></o:p>
median<o:p></o:p>
11<o:p></o:p>
41677800<o:p></o:p>
2/18/2013<o:p></o:p>
median<o:p></o:p>
12<o:p></o:p>
11250138<o:p></o:p>
2/18/2013<o:p></o:p>
median<o:p></o:p>
13<o:p></o:p>
36601355<o:p></o:p>
2/19/2013<o:p></o:p>
median<o:p></o:p>
14<o:p></o:p>
25141098<o:p></o:p>
2/19/2013<o:p></o:p>
median<o:p></o:p>
15<o:p></o:p>
36601355<o:p></o:p>
2/20/2013<o:p></o:p>
<o:p></o:p>
16<o:p></o:p>
36601355<o:p></o:p>
2/26/2013<o:p></o:p>
<o:p></o:p>
17<o:p></o:p>
19933146<o:p></o:p>
3/1/2013<o:p></o:p>
<o:p></o:p>
18<o:p></o:p>
19933146<o:p></o:p>
3/4/2013<o:p></o:p>
<o:p></o:p>
19<o:p></o:p>
19933146<o:p></o:p>
3/25/2013<o:p></o:p>
<o:p></o:p>
20<o:p></o:p>
36601355<o:p></o:p>
3/28/2013<o:p></o:p>
<o:p></o:p>

<TBODY>
</TBODY>
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,203,249
Messages
6,054,380
Members
444,721
Latest member
BAFRA77

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