Excel - linest function with blanks help

  • Thread starter Thread starter lavster
  • Start date Start date
  • Tags Tags
    Excel Function
Click For Summary
The discussion centers on using the LINEST function in Excel with blank cells in the data range. The user is attempting to apply the function to a dataset where the dependent variable (E6:E16) only contains values for corresponding measurements, while the independent variable (A6:A16) consists of a sequential range of numbers. A solution is proposed that involves creating an array function to handle the blanks effectively. This solution requires using the OFFSET and SMALL functions to filter out the blank entries and only include the measured values in the LINEST calculation. Additionally, it is noted that the expression should be entered as an array formula by pressing Ctrl+Shift+Enter. The discussion also mentions the need to clarify the purpose of the "^{1,2,3}" notation in the original formula, suggesting that it can be integrated with careful adjustments to the proposed solution.
lavster
Messages
213
Reaction score
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: 647
Physics news on Phys.org
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.
 
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 19 ·
Replies
19
Views
2K
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
545
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 75 ·
3
Replies
75
Views
6K
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K