How to fill in missing date rows in an Excel spreadsheet?

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
147
Office Version
  1. 365
Platform
  1. Windows
My Excel spreadsheet looks like the following:

DateClose
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:

DateClose
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?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Próbka na forum.xlsx
ABCDEFGH
1DateCloseDateClose
22015-12-315007,412015-12-315007,41
32016-01-044903,092016-01-015007,41
42016-01-054891,432016-01-025007,41
52016-01-064835,762016-01-035007,41
62016-01-074689,432016-01-044903,09
72016-01-084643,632016-01-054891,43
82016-01-114637,992016-01-064835,76
92016-01-124685,922016-01-074689,43
102016-01-134526,062016-01-084643,63
112016-01-1446152016-01-094643,63
122016-01-154488,422016-01-104643,63
132016-01-194476,952016-01-114637,99
142016-01-204471,692016-01-124685,92
152016-01-134526,06
162016-01-144615
172016-01-154488,42
182016-01-164488,42
192016-01-174488,42
202016-01-184488,42
212016-01-194476,95
222016-01-204471,69
23
Arkusz2
Cell Formulas
RangeFormula
F2:F22F2=SEQUENCE(MAX(B2:B14)-MIN(B2:B14)+1,,MIN(B2:B14),1)
G2:G22G2=XLOOKUP(F2#,B2:B14,C2:C14,"",-1,2)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,213,533
Messages
6,114,179
Members
448,554
Latest member
Gleisner2

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