• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using LOGEST (or trendline coefficient formulas) with blank cells

cwilson

New Member
I have about 25,000 rows of data (oil production data over time) -- some are complete ranges, but most have a few blanks. I need the decline rate of each row (ie. a coefficient in the exponential trendline), and so it seems to avoid making 25,000 charts and fitting exp trendlines, I can use either LOGEST or an INDEX LINEST (below):


Equation: y = c *e ^(b * x)

c: =EXP(INDEX(LINEST(LN(y),x),1,2))

b: =INDEX(LINEST(LN(y),x),1)


These both work for rows without blanks. I have tried inserting IF(ISERROR(etc.. into both formulas to simply skip the blanks, but I just get errors. I'd prefer to avoid finicky fixes like just removing the blanks, or filling in the blanks by averaging the surrounding data, because I need to repeat this on many sheets.


Any ideas how to make either LOGEST or INDEX(LINEST(LN(y),x),1) skip blanks? I've spent days searching blogs for a solution to no avail. Thanks!!
 
Hi, cwilson!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


Regards!
 
Hi Wilson ,


Doesn't this help ?


http://newtonexcelbach.wordpress.com/2011/05/14/using-linest-on-data-with-gaps/


https://groups.google.com/forum/?fromgroups#!topic/microsoft.public.excel.worksheet.functions/vzmcd2WUeO0


For the second link , copy paste the entire address in your browser.


Narayan
 
Neither of those helped. Maybe this is a better way of asking:


I took this formula, which is a bit different from my first post but accomplishes the same thing, {=LINEST(LN(A2:S2),A1:S1,TRUE,TRUE)}


and added an if(isnumber(... to try to get it to ignore/skip blanks

=LINEST(IF(ISNUMBER(A2:S2),LN(A2:S2)),A1:S1,TRUE,TRUE)


Still doesn't work. Any other ideas? Thanks again!
 
Hi, cwilson!


With the warning that my statistical skills are poor, this is the way to solve the problem of the emptiness... but that emptiness should be filled. Initially I thought in zero, but ln(0) isn't liked by maths so I used 1. Does it help?


=ESTIMACION.LINEAL(SI(ESNUMERO(A2:S2);LN(A2:S2);1);SI(A1:S1>0;A1:S1;1);VERDADERO;VERDADERO) -----> in english: =LINEST(IF(ISNUMBER(A2:S2),LN(A2:S2),1),IF(A1:S1>0,A1:S1,1),TRUE,TRUE)


Regards!
 
Have a try of the technique mentioned here:

http://chandoo.org/wp/2012/03/01/formula-forensic-014/


You will need to extract the data to an extraction area and then use the stats functions on the extracted data
 
Back
Top