property2452
New Member
- Joined
- Jun 17, 2011
- Messages
- 2
Hi, I am trying to find the median of a set of prices if within a date range and if the status of the product is "Sold". I have read several forums and have an ide of what I am trying to acheive but cannot get the formula to work. The data is as follows.
-- removed inline image ---
<table style="width: 327px; height: 528px;" border="0" cellpadding="0" cellspacing="0"><col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:3218;width:66pt" width="88"> <col style="mso-width-source:userset;mso-width-alt:3657;width:75pt" width="100"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;width:48pt" height="20" width="64">Status</td> <td class="xl63" style="border-left:none;width:66pt" width="88">Date</td> <td class="xl63" style="border-left:none;width:75pt" width="100">Price</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">30/09/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 570,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">5/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 760,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">5/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 780,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">13/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 115,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">13/11/2009</td> <td class="xl64" style="border-top:none;border-left:none"> 950,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">14/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 650,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">15/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 349,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">20/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 535,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">19/12/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 189,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">19/01/2010</td> <td class="xl64" style="border-top:none;border-left:none"> 1,280,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">31/01/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 385,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">1/02/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 445,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">9/02/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 215,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">11/02/2010</td> <td class="xl64" style="border-top:none;border-left:none"> 565,000 </td> </tr> </tbody></table>
(sorry about image, can't seem to paste in cells or insert image)
I am basically trying to get the following result:
=median(if(and(Status="Sold",Date=2010),Price)
Through the following formula (with Shift Control Enter):
=MEDIAN(IF(and(a:a="Sold",YEAR(b:b=2010),c:c))
Look forward to any suggestions
-- removed inline image ---
<table style="width: 327px; height: 528px;" border="0" cellpadding="0" cellspacing="0"><col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:3218;width:66pt" width="88"> <col style="mso-width-source:userset;mso-width-alt:3657;width:75pt" width="100"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;width:48pt" height="20" width="64">Status</td> <td class="xl63" style="border-left:none;width:66pt" width="88">Date</td> <td class="xl63" style="border-left:none;width:75pt" width="100">Price</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">30/09/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 570,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">5/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 760,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">5/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 780,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">13/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 115,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">13/11/2009</td> <td class="xl64" style="border-top:none;border-left:none"> 950,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">14/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 650,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">15/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 349,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">20/11/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 535,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">19/12/2009</td> <td class="xl66" style="border-top:none;border-left:none"> 189,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">19/01/2010</td> <td class="xl64" style="border-top:none;border-left:none"> 1,280,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">31/01/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 385,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">1/02/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 445,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Sold </td> <td class="xl65" style="border-top:none;border-left:none" align="right">9/02/2010</td> <td class="xl66" style="border-top:none;border-left:none"> 215,000 </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl64" style="height:15.0pt;border-top:none" height="20"> Listed </td> <td class="xl67" style="border-top:none;border-left:none" align="right">11/02/2010</td> <td class="xl64" style="border-top:none;border-left:none"> 565,000 </td> </tr> </tbody></table>
(sorry about image, can't seem to paste in cells or insert image)
I am basically trying to get the following result:
=median(if(and(Status="Sold",Date=2010),Price)
Through the following formula (with Shift Control Enter):
=MEDIAN(IF(and(a:a="Sold",YEAR(b:b=2010),c:c))
Look forward to any suggestions