VLook up question

  • Thread starter Thread starter Wolfwalker721
  • Start date Start date
W

Wolfwalker721

I have 2 colums of data as follows

1-1-05 2
3-1-05 3
5-1-05 5

I need to fill in the blanks with the previous dates value

so I need to end up with
1-1-05 2
2-1-05 2
3-1-05 3
4-1-05 3
5-1-05 5
6-1-06 5

I have the dates set up in a different column, but I need help to get the
data there


I hope this makes sence...
Thanks in advance for your time

Wolfwalker
 
try this idea

Sub fillinmissing()
mc = 1 'col A
For i = Cells(Rows.Count, mc).End(xlUp).Row To 1 Step -1
If Cells(i - 1, mc) <> Cells(i, mc) Then
Rows(i).Insert
Cells(i, mc) = Cells(i - 1, mc) + 1
Cells(i, mc + 1) = Cells(i - 1, mc + 1)
End If
Next i
End Sub
 
This is fabulous!

The one problem is that it only adds a day to the date instead of a month.
 
Back
Top