PSJupiter2
New Member
- Joined
- Mar 18, 2015
- Messages
- 7
I wish to create a UDF that calculates a formula used in Mass Appraisal of Real Estate
I use MS Excel 2007, and Windows 7
This is a sample what my Data looks like:
[TABLE="width: 250"]
<tbody>[TR]
[TD]AssessedValue[/TD]
[TD]SalePrice[/TD]
[TD]Ratio = AV/SP[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]88[/TD]
[TD]1.02
[/TD]
[/TR]
[TR]
[TD]90
[/TD]
[TD]93[/TD]
[TD]0.97[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]87[/TD]
[TD]1.03[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]94[/TD]
[TD]0.96[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]85[/TD]
[TD]1.06[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]96[/TD]
[TD]0.94[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]95[/TD]
[TD]0.95[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]98[/TD]
[TD]0.92[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]100[/TD]
[TD]0.90[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]98[/TD]
[TD]0.92[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]97[/TD]
[TD]0.93[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
My data ranges will be different every time I use the UDF ("n" is based on the number of data points available)
To my knowledge, there is no built-in formula for the following:
Control - Shift - Enter:
{=((AVERAGE(ABS(C2:C15-(MEDIAN(C2:C15)))))/(MEDIAN(C2:C15)))*100}
I thought a UDF would be the way to go. I am trying to accomplish the following:
Function COD(Ratio, Median)
COD= {((AVERAGE(ABS("Range of available data" - "Median of Available Data"))))/(MEDIAN("Median of Available Data"))*100}
End Function
Any help on this would be greatly appreciated! Thank You!
I use MS Excel 2007, and Windows 7
This is a sample what my Data looks like:
[TABLE="width: 250"]
<tbody>[TR]
[TD]AssessedValue[/TD]
[TD]SalePrice[/TD]
[TD]Ratio = AV/SP[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]88[/TD]
[TD]1.02
[/TD]
[/TR]
[TR]
[TD]90
[/TD]
[TD]93[/TD]
[TD]0.97[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]87[/TD]
[TD]1.03[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]94[/TD]
[TD]0.96[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]85[/TD]
[TD]1.06[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]96[/TD]
[TD]0.94[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]95[/TD]
[TD]0.95[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]98[/TD]
[TD]0.92[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]100[/TD]
[TD]0.90[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]98[/TD]
[TD]0.92[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]97[/TD]
[TD]0.93[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]90[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
My data ranges will be different every time I use the UDF ("n" is based on the number of data points available)
To my knowledge, there is no built-in formula for the following:
Control - Shift - Enter:
{=((AVERAGE(ABS(C2:C15-(MEDIAN(C2:C15)))))/(MEDIAN(C2:C15)))*100}
I thought a UDF would be the way to go. I am trying to accomplish the following:
Function COD(Ratio, Median)
COD= {((AVERAGE(ABS("Range of available data" - "Median of Available Data"))))/(MEDIAN("Median of Available Data"))*100}
End Function
Any help on this would be greatly appreciated! Thank You!