AutoFill the data

E

Elton Law

Dear Expert,
Got a question.

Want to autofill the data from one row to next data row
Say for an example, want to fill 13479.35 from 15 Jun to 21 Jun and then
stop because it has data in 22 Jun.
Then do again, fill new data (13359.69) in 22 Jun till 28 Jun, then stop
because it has new data in 29 Jun.
Rows separation are uneven because there may have holidays ...
So, data may separate by 5 rows, sometimes 3 rows ....
I am using Excel 2000. Would be greatly appreciate if you can help. Thanks

Before:

15 Jun 13479.35
18 Jun
19 Jun
20 Jun
21 Jun
22 Jun 13359.69
25 Jun
26 Jun
27 Jun
28 Jun
29 Jun 13259.86
2 Jul
3 Jul

After:

15 Jun 13479.35
18 Jun 13479.35
19 Jun 13479.35
20 Jun 13479.35
21 Jun 13479.35
22 Jun 13359.69
25 Jun 13359.69
26 Jun 13359.69
27 Jun 13359.69
28 Jun 13359.69
29 Jun 13259.86
2 Jul 13259.86
3 Jul 13259.86
 
D

Don Guillett

One way
Sub fillinblanks()
For Each c In Range("j1:j13")
If Len(Application.Trim(c)) < 1 And _
c.Offset(, -1) > 0 Then
c.Value = c.Offset(-1).Value
End If
Next c
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top