Trend Function to ignore blanks

bmacias

Board Regular
Joined
Sep 11, 2002
Messages
217
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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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: 220
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,600
Members
452,658
Latest member
GStorm

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