ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoFill the data (https://www.excelbanter.com/excel-programming/428414-autofill-data.html)

Elton Law[_2_]

AutoFill the data
 
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

Befo

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

Don Guillett

AutoFill the data
 
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


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Elton Law" wrote in message
...
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

Befo

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




All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com