Question: I have the following excel table:

```
StartDate  YTDActual
1/1/2013   100
2/1/2013   200
3/1/2013   99
4/1/2013   33
5/1/2013   45
6/1/2013   0
7/1/2013   0

```

Is there a formula that returns, for each StartDate, the associated value in YTDActual, if it is different than 0, otherwise it would return the last YTDActual value different than 0 in the previous rows.

So, basically the formula would produce the following values in the NewValue column:

```
StartDate  NewValue
1/1/2013   100
2/1/2013   200
3/1/2013   99
4/1/2013   33
5/1/2013   45
6/1/2013   45
7/1/2013   45

```

Note that in Jun & Jul the values are 45 because May had the last non-zero YTDActual value 45.

Thanks

Update: Just a clarification, the second table goes onto another sheet, they are not side by side.

Answer: 
This would do it:

```
Col A      Col B        Col C
StartDate  YTDActual    NewValue
1/1/2013   100          =if(B2<>0,B2,C1)
...

```

Then just drag down the formula in Column C
If your dates start at A2 and YTD Actual amounts start at B2 try this formula for C2 copied down

`=LOOKUP(2,1/(B$2:B2<>0),B$2:B2)`

that will give you the required results