Trend Function to ignore blanks

bmacias

Board Regular
Joined
Sep 11, 2002
Messages
215
In cells K2:K9 I have values but sometimes there are blanks . For example in this particular case only have values on cells K4:K6 (K4=925, K5=755, K6=900).

The formula {=TREND(K4:K6)} works fine and returns 872.5 for the first value on L4...BUT I don't know which cells from K2:K9 will be populated.

I already tried {=TREND(IF(K2:K9<>" ",K2:K9))} but it returns 432.083 on L4 which means that its treating the blank cells as zeros.

Any ideas on how I can rewrite the CSE formula to not take into account the blank cells?

Thanks in advance,

Ben
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Control+shift+enter, not just enter:

=TREND(INDEX(K2:K9,MATCH(TRUE,ISNUMBER(K2:K9),0)):INDEX(K2:K9,MATCH(9.99999999999999E+307,K2:K9)))
 
Upvote 0
Hello
i have attempted to use the formula to the forecast function but it's not returning the correct information. would you be able to advise. Row labels are months, I would like to use the data under column labels to forecast downward trend in next 6 months ignoring the zero/blanks. Traditional Trend/Forecast works but it takes into account the zeros as previous poster suggested.

much appreciated.

Control+shift+enter, not just enter:

=TREND(INDEX(K2:K9,MATCH(TRUE,ISNUMBER(K2:K9),0)):INDEX(K2:K9,MATCH(9.99999999999999E+307,K2:K9)))
 

Attachments

  • forecast.JPG
    forecast.JPG
    94.7 KB · Views: 209
Upvote 0

Forum statistics

Threads
1,216,157
Messages
6,129,195
Members
449,493
Latest member
JablesFTW

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