My Excel spreadsheet looks like the following:
...and I want it to look like this:
So basically if the next row is not one day later than the current row, then add a new row with the current row's price until the next row's date matches. How do I do this?
Date | Close |
12/31/2015 | 5007.41 |
1/4/2016 | 4903.09 |
1/5/2016 | 4891.43 |
1/6/2016 | 4835.76 |
1/7/2016 | 4689.43 |
1/8/2016 | 4643.63 |
1/11/2016 | 4637.99 |
1/12/2016 | 4685.92 |
1/13/2016 | 4526.06 |
1/14/2016 | 4615 |
1/15/2016 | 4488.42 |
1/19/2016 | 4476.95 |
1/20/2016 | 4471.69 |
...and I want it to look like this:
Date | Close |
12/31/2015 | 5007.41 |
1/1/2016 | 5007.41 |
1/2/2016 | 5007.41 |
1/3/2016 | 5007.41 |
1/4/2016 | 4903.09 |
1/5/2016 | 4891.43 |
1/6/2016 | 4835.76 |
1/7/2016 | 4689.43 |
1/8/2016 | 4643.63 |
1/9/2016 | 4643.63 |
1/10/2016 | 4643.63 |
1/11/2016 | 4637.99 |
1/12/2016 | 4685.92 |
1/13/2016 | 4526.06 |
1/14/2016 | 4615 |
1/15/2016 | 4488.42 |
1/16/2016 | 4488.42 |
1/17/2016 | 4488.42 |
1/18/2016 | 4488.42 |
1/19/2016 | 4476.95 |
1/20/2016 | 4471.69 |
So basically if the next row is not one day later than the current row, then add a new row with the current row's price until the next row's date matches. How do I do this?