Excel - linest function with blanks help

In summary, the conversation discusses how to use the LINEST function with blank cells and provides a solution using a combination of other functions. The solution is an array function and requires pressing Ctrl+Shift+Enter. The conversation also mentions incorporating the "^{1,2,3}" through careful editing.
  • #1
lavster
217
0
Hi,
Ive been trying to use the linest function with blanks but I can't get it to work... (specifically =INDEX(LINEST(E6:E16,A6:A16^{1,2,3}),1). Here A6:A16 is a number increasing in increments of 1 between 25 to 35, and E6:E16 is only filled if the corresponding measurment is made. Does anyone know how to do this? I attach a screen shot
Thanks
 

Attachments

  • screen shot.png
    screen shot.png
    3.4 KB · Views: 608
Physics news on Phys.org
  • #2
LINEST can be expressed in terms of more basic functions, if the built-in function does not work. Alternatively, you can make a second list with only the measured values.
 
  • #3
The solution to this is non-trivial. The following should work, but it is an array function. This means, when you place it, you must press Ctrl+Shift+Enter, rather than Enter.

Code:
=INDEX(LINEST(N(OFFSET(A6:A16,SMALL(IF(A6:A16<>0,ROW(A6:A16)-ROW(A6)),
  ROW(INDIRECT("1:"&COUNT(A6:A16)))),,1)),N(OFFSET(E6:E16,
  SMALL(IF(A6:A16<>0,ROW(A6:A16)-ROW(A6)),ROW(INDIRECT("1:"&
  COUNT(A6:A16)))),,1))),1)

I'm not sure what "^{1,2,3}" was supposed to do, but I'm sure you can incorporate that through careful editing of the above expression.
 

Related to Excel - linest function with blanks help

What is the "linest" function in Excel?

The "linest" function in Excel is a statistical function that calculates the line of best fit for a given set of data points. It can be used to predict future values based on the existing data.

How do I use the "linest" function in Excel?

To use the "linest" function in Excel, you need to select the cell where you want the function to be displayed and then type "=linest" followed by the range of data for the dependent variable and the range of data for the independent variable. You can also add additional parameters such as "known_x's" and "known_y's" to specify a range of known data points.

What should I do if there are blanks in my data set when using the "linest" function?

If there are blanks in your data set, you can use the "IF" and "ISBLANK" functions to replace the blank cells with a value of 0. This will ensure that the "linest" function can still calculate the line of best fit accurately.

How do I interpret the results of the "linest" function?

The "linest" function returns an array of values, with the first value being the y-intercept and subsequent values representing the coefficients of the independent variables. These values can be used to create a linear equation of the form y = mx + b, where m is the slope and b is the y-intercept.

Can the "linest" function be used for non-linear data?

No, the "linest" function can only be used for linear data. If your data follows a non-linear pattern, you will need to use a different function or method to calculate the line of best fit.

Similar threads

  • Computing and Technology
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
19
Views
2K
Replies
10
Views
1K
  • Programming and Computer Science
Replies
2
Views
521
  • Programming and Computer Science
3
Replies
75
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
4K
Replies
6
Views
4K
Replies
10
Views
2K
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
11K
Back
Top