LINEST function and Blank Spaces

JeffGrant

Well-known Member
Joined
Apr 7, 2021
Messages
516
Office Version
  1. 365
Platform
  1. Windows
Hi All, I have a curly one.

over the same data set, in rows, I am running from linear regression to 5th degree regression.

As a measure of confidence level, I would like to run R^2 over each data set to determine which polynomial gives me the highest confidence level.

The issue is that the data set can have between two and ten values. So immediately, using LINEST on a fixed range will fail because of the blanks.

However, the blanks aren't really blanks, they are the results of an IFERROR statement.

I have tried using the FILTER function on the known x's and that works fine, however FILTER on the known y's - not so much.

The number of "blanks" in the known y's will always be the same in the known x's.

Can somebody please give me some direction on how best to achieve this goal?

I have changed the horizontal ranges manually in this sample data, but when I use a full data sheet, that could easy be 2000 lines, so doing it manually is a little of out of the realm of possibility.

Thanks in advance.

Book1
ABCDEFGHIJKLMNOPQRSTUVWXY
1Form Weights (kg)Speed (m/s)
21098765432110987654321Rsqd ^1Rsqd ^ 2Rsqd ^ 3Rsqd^4Rsqd^5
30.00.00.057.056.058.060.055.055.060.016.8717.2116.6016.2416.9616.7616.770.4362150.4730150.6911880.7109780.710978
40.057.056.056.557.057.055.558.058.058.516.1716.2816.8117.1916.6916.9016.8216.8517.240.1539740.2789450.2797270.3987210.397614
558.560.557.558.555.557.557.059.556.559.016.5016.6716.9616.5016.4816.9816.5416.6316.5716.710.0105120.1050840.2351340.2820310.278945
60.00.00.00.054.056.053.057.555.559.017.0016.7516.8016.6817.2817.080.003410.0034320.586760.6285520.627001
754.556.056.556.557.056.557.056.060.058.016.8416.9416.8116.5017.0717.0316.5116.5616.2917.120.1098440.2271850.4457860.4831650.483307
80.00.00.00.00.057.557.558.058.058.016.5716.7516.9216.8517.510.4479630.4479630.4479630.4479630.447963
Sheet1
Cell Formulas
RangeFormula
U3:U8U3=RSQ(K3:T3,A3:J3)
V3V3=INDEX(LINEST(N3:T3,D3:J3^{1;2},TRUE,TRUE),3,1)
W3W3=INDEX(LINEST(N3:T3,D3:J3^{1;2;3},TRUE,TRUE),3,1)
X3X3=INDEX(LINEST(N3:T3,D3:J3^{1;2;3;4},TRUE,TRUE),3,1)
Y3Y3=INDEX(LINEST(N3:T3,D3:J3^{1;2;3;4;5},TRUE,TRUE),3,1)
V4V4=INDEX(LINEST(L4:T4,B4:J4^{1;2},TRUE,TRUE),3,1)
W4W4=INDEX(LINEST(L4:T4,B4:J4^{1;2;3},TRUE,TRUE),3,1)
X4X4=INDEX(LINEST(L4:T4,B4:J4^{1;2;3;4},TRUE,TRUE),3,1)
Y4Y4=INDEX(LINEST(L4:T4,B4:J4^{1;2;3;4;5},TRUE,TRUE),3,1)
V5,V7V5=INDEX(LINEST(K5:T5,A5:J5^{1;2},TRUE,TRUE),3,1)
W5,W7W5=INDEX(LINEST(K5:T5,A5:J5^{1;2;3},TRUE,TRUE),3,1)
X5,X7X5=INDEX(LINEST(K5:T5,A5:J5^{1;2;3;4},TRUE,TRUE),3,1)
Y5,Y7Y5=INDEX(LINEST(K5:T5,A5:J5^{1;2;3;4;5},TRUE,TRUE),3,1)
V6V6=INDEX(LINEST(O6:T6,E6:J6^{1;2},TRUE,TRUE),3,1)
W6W6=INDEX(LINEST(O6:T6,E6:J6^{1;2;3},TRUE,TRUE),3,1)
X6X6=INDEX(LINEST(O6:T6,E6:J6^{1;2;3;4},TRUE,TRUE),3,1)
Y6Y6=INDEX(LINEST(O6:T6,E6:J6^{1;2;3;4;5},TRUE,TRUE),3,1)
V8V8=INDEX(LINEST(P8:T8,F8:J8^{1;2},TRUE,TRUE),3,1)
W8W8=INDEX(LINEST(P8:T8,F8:J8^{1;2;3},TRUE,TRUE),3,1)
X8X8=INDEX(LINEST(P8:T8,F8:J8^{1;2;3;4},TRUE,TRUE),3,1)
Y8Y8=INDEX(LINEST(P8:T8,F8:J8^{1;2;3;4;5},TRUE,TRUE),3,1)
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,863
Messages
6,121,978
Members
449,058
Latest member
oculus

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