I have 3 columns with multiple rows of data:
Date, Actuals, and Forecast.
I introduced a 4th column, Trend, and want to use the TREND function in Excel using the latest 3 values from actuals. However, when I reach the Sep-2020 row, I run out of actual values to illustrate the trend, so I want to use the last 2 actuals (Jun and Jul) plus the previous Forecast (Aug).
Question: is there a way for the TREND function to consume non-contiguous cells?
In D5 put:
=TREND(IF(B2:B4<>"",B2:B4,C2:C4),A2:A4,A5)
This is an array formula and depending on one's version may necessitate the confirmation of the array formula with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
Then copy down.