This may or may not be what you are after.
This Assumes you know which cells you will be referencing. And remember this is only an example..
IF(A2<TODAY(),D2,INDEX(D,COUNTA(D) + 1))
Using the IF function.
First Compare date value in A2 with Todays date TODAY() as the if-expression
We use the less than symbol < to return a true or false for the expression.
If the expression returns True, then we fill the cell with The cell data in D2
If the expression returns False, then we fill the cell with the last with data in column D
The INDEX function returns the value in the cell located at the
intersection of the specified row and column within a collection of
cells or from an array returned by an array function.
The COUNTA function returns the number of its arguments that are not
It is bets you look up in the Functions panel for a fuller explanation on all the functions.
Once you have set up the first row use the drag handle to drag the formula cell down to the other rows you want it on.
They will auto adjust to the correct cell references.
- At time of this posting the date was 6 September 2014
- You will need to find a way of dealing with Blank cells in the data column. If a blank cell is found it will throw the results. You should find a resolve with a google search. It will be the COUNTA function that you need to look at.