Ignore blanks or 0's in Linest Formula

dadsocks

New Member
Joined
Dec 11, 2015
Messages
2
I have seen a couple of threads on this but haven't been able to get this to work for myself. I am trying to report on particular values over a calendar year; are these values trending upwards or downwards?

The particular project started mid year so January thru May are blank - but over time these values will populate (obviously).

How would I take the following and return a trend-line that ignores the blank values and returns a value based solely on populated months; in this case June 2015-Oct 2015:

X ValuesOct 14Nov 14Dec 14Jan 15Feb 15Mar 15Apr 15May 15Jun 15Jul 15Aug 15Sep 15Oct 15
Y Values00000000161171180185131

<tbody>
</tbody>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
delete the zeros to make them blank. insert the data in a new chart, add trend line in the chart element. in the select data option, hidden and empty cells, select connect data points with line.
 
Upvote 0
RayK - thanks for the reply - I am not charting this - It will simply be used to determine if this value is trending up or trending down. It's part of a dashboard so I do not want to have to adjust the formula every month for the next six months. This would also be valuable if there is a month that should not be included.
 
Upvote 0
hmmm then I'm either not quite following or that I don't know of a formula that would help trend it. Unless you want to do conditional formatting with the arrows?
 
Upvote 0
First, define the following name...

1) Ribbon > Formulas > Defined Names > Define Name

2) Name: BigNum

3) Refers to: =9.99999999999999E+307

4) Click Ok

Then, try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER...

=LINEST(INDEX(B3:N3,MATCH(TRUE,B3:N3<>0,0)):INDEX(B3:N3,MATCH(BigNum,B3:N3)),INDEX(B2:N2,MATCH(TRUE,B3:N3<>0,0)):INDEX(B2:N2,MATCH(BigNum,B3:N3)))

Note that here INDEX/MATCH is used to define the relevant range, which starts at the first cell that isn't empty or doesn't contain a zero, and ends at the last cell that contains a numerical value, including any zero's that may exist.

Hope this helps!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,724
Messages
6,126,477
Members
449,315
Latest member
misterzim

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