Slope Array Formula with Conditions #Num! Error

PSJupiter2

New Member
Joined
Mar 18, 2015
Messages
7
Hello,

I am trying to use one array formula to recreate the following linear regression formula:

Y = (SalesRatio-MedianSalesRatio)/MedianSalesRatio
X = LN(((EMV/MedianSalesRatio)⁄(2))+ (SalePrice⁄(2)))/LN(2)

Here is my data:

SalePrice

<tbody>
</tbody>
Estimated Market Value (EMV)

<tbody>
</tbody>
SalesRatio
(EMV / SalePrice)

<tbody>
</tbody>
AdjustedValue
EMV / MedianSalesRatio

<tbody>
</tbody>
Proxy Value
(AdjustedValue / 2) + (SalePrice / 2)

<tbody>
</tbody>
Y = SalesRatio-MedianSalesRatio / MedianSalesRatio

<tbody>
</tbody>
X = LN(ProxyValue) / LN (2)

<tbody>
</tbody>
Condition

<tbody>
</tbody>
ABCDEFGH
1206500198500.96260425233463.2617.835
2225900208200.92273152249526.2117.935
3
416500

<tbody>
</tbody>
315000.76413270414885-0.0118.666
4
424800

<tbody>
</tbody>
319300.75418911421856-0.0118.697
5
455300

<tbody>
</tbody>
326300.774280954264470.0118.705
6
576600

<tbody>
</tbody>
379900.66498416537508-0.1419.046
7MEDIAN SALES RATIO0.76ConditionPrice Related Bias
85?????
9Price Rel Bias6?????
10Manually Calc
-31.17%​
7?????
11Formatically-31.17%

<tbody>
</tbody>



The goal is to calculate what is called a "Price Related Bias" for each "Condition". My actual table will have thousands of rows.

I want the calculation to be in one array formula for each condition

The formula for the entire sample (no conditions) is:

[ SLOPE(((C2:C6-$C$7)/$C$7),LN((((B2:B6)/$C$7)*0.5)+((A2:A7)*0.5))/LN(2)) ]

I believe the formula for finding this Price Related Bias for "Condition 5" should be:

[ { SLOPE(((IF(H2:H7=G8,C2:C7)-MEDIAN(IF(H2:H7=G8,C2:C7))/MEDIAN(IF(H2:H7=G8,C2:C7)))),(LN(((IF(H2:H7=G8,B2:B7)/MEDIAN(IF(H2:H7=G8,C2:C7)))*0.5)+((IF(H2:H7=G8,A2:A7))*0.5)))/(LN(2))) } ]

With a formula result of:

-0.2754

However the formula returns the #NUM! error

I am stumped. Both sides of the regression formula work on their own (using an array entry). I am not sure if this problem lies in my formula or if my formula is too simple.

Any help would be greatly appreciated.

MS Excel 2007
Windows 7

Best Regards,

PSJupiter2
 
Last edited:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,215,555
Messages
6,125,490
Members
449,234
Latest member
slzaleski

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