Yuri,
Good find! Thanks for the info. Looks like I'll have to write the function.
Regards,
Mike
>Michael,
>
>If you wish to reproduce the exact algorithm as it is used in Excel, then probably here is the good guidenance (and with comparison with other methods)http://www.haiweb.org/medicineprices/manual/quartiles_iTSS.pdf
>
>
>>Yuri,
>>
>>I know that it can be done using Excel but that is not an option in this case.
>>
>>Thanks,
>>Mike
>>
>>>As far as I know, there are some differences in the way how percentile is calculated in different products. Thus, if you wish to do it exactly "as provided in Excel", then here is the direct way to do it. Assuming you have array "atemp" defined and populated:
>>>
>>>ObjExcel=createobject("Excel.Application")
>>>*Define the K here....
>>>* k=
>>>?ObjExcel.WorksheetFunction.Percentile(@atemp, K)
>>>.....
>>>
>>>
>>>
>>>>Anybody have the code to emulate the percentile function as provided in Excel (and willing to share <g>).
>>>>
>>>>Thanks,
>>>>Mike
>>>>
>>>>(and yes, I do still get to do some VFP code from time to time)
Michael McLain